diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-02-28 16:16:08 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-02-28 16:16:08 +0000 |
commit | f2b63bcaa647d1ec839dbe2e5edbe5c4fde1b304 (patch) | |
tree | 106ab2bbf7c34a2b0f6cd73cb4221661a05bc9c0 /src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h | |
parent | ba56545de435b62e0528d01fbde342bc4653da13 (diff) |
Fix cppcheck
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@2120 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 49a5c2c6e94d9fbf235eecc92fa30e62980c7c70
Diffstat (limited to 'src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h')
-rw-r--r-- | src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h b/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h index aad05547..6870c183 100644 --- a/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Euclidean_strong_witness_complex.h @@ -23,17 +23,15 @@ #ifndef EUCLIDEAN_STRONG_WITNESS_COMPLEX_H_ #define EUCLIDEAN_STRONG_WITNESS_COMPLEX_H_ -#include <utility> -#include <vector> -#include <list> -#include <limits> - #include <gudhi/Strong_witness_complex.h> #include <gudhi/Active_witness/Active_witness.h> #include <gudhi/Kd_tree_search.h> +#include <utility> +#include <vector> + namespace Gudhi { - + namespace witness_complex { /** @@ -46,8 +44,10 @@ namespace witness_complex { * href="http://doc.cgal.org/latest/Kernel_d/classCGAL_1_1Epick__d.html">CGAL::Epick_d</a> class. */ template< class Kernel_ > -class Euclidean_strong_witness_complex : public Strong_witness_complex<std::vector<typename Gudhi::spatial_searching::Kd_tree_search<Kernel_, std::vector<typename Kernel_::Point_d>>::INS_range>> { -private: +class Euclidean_strong_witness_complex + : public Strong_witness_complex<std::vector<typename Gudhi::spatial_searching::Kd_tree_search<Kernel_, + std::vector<typename Kernel_::Point_d>>::INS_range>> { + private: typedef Kernel_ K; typedef typename K::Point_d Point_d; typedef std::vector<Point_d> Point_range; @@ -58,12 +58,12 @@ private: typedef typename Nearest_landmark_range::Point_with_transformed_distance Id_distance_pair; typedef typename Id_distance_pair::first_type Landmark_id; typedef Landmark_id Vertex_handle; - + private: Point_range landmarks_; Kd_tree landmark_tree_; using Strong_witness_complex<Nearest_landmark_table>::nearest_landmark_table_; - + public: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* @name Constructor @@ -81,22 +81,19 @@ private: typename WitnessRange > Euclidean_strong_witness_complex(const LandmarkRange & landmarks, const WitnessRange & witnesses) - : landmarks_(std::begin(landmarks), std::end(landmarks)), landmark_tree_(landmarks_) - { + : landmarks_(std::begin(landmarks), std::end(landmarks)), landmark_tree_(landmarks_) { nearest_landmark_table_.reserve(boost::size(witnesses)); for (auto w: witnesses) nearest_landmark_table_.push_back(landmark_tree_.query_incremental_nearest_neighbors(w)); } - /** \brief Returns the point corresponding to the given vertex. */ template <typename Vertex_handle> - Point_d get_point( Vertex_handle vertex ) const - { + Point_d get_point(Vertex_handle vertex) const { return landmarks_[vertex]; } - + //@} }; |