summaryrefslogtreecommitdiff
path: root/src/Cech_complex
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-03-22 17:08:54 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-03-22 17:08:54 +0000
commit90ea210d07afa9c48a19cdad0621d607b4ebd54b (patch)
tree0013581ab303e9e6c09a0b966641d5a517a92647 /src/Cech_complex
parentb69cc713465675a9bab998cb0688eb91390978a6 (diff)
code review : no more ForwardPointRange copy. Use of a vector instead.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3306 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: f848c18595303bfb802998746ee6fe2a308c68df
Diffstat (limited to 'src/Cech_complex')
-rw-r--r--src/Cech_complex/include/gudhi/Cech_complex.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Cech_complex/include/gudhi/Cech_complex.h b/src/Cech_complex/include/gudhi/Cech_complex.h
index bfad8b77..7c2e31ac 100644
--- a/src/Cech_complex/include/gudhi/Cech_complex.h
+++ b/src/Cech_complex/include/gudhi/Cech_complex.h
@@ -57,6 +57,9 @@ class Cech_complex {
using Vertex_handle = typename SimplicialComplexForProximityGraph::Vertex_handle;
using Filtration_value = typename SimplicialComplexForProximityGraph::Filtration_value;
using Proximity_graph = Gudhi::Proximity_graph<SimplicialComplexForProximityGraph>;
+ using Point_iterator = typename boost::range_const_iterator<ForwardPointRange>::type;
+ using Point= typename std::iterator_traits<Point_iterator>::value_type;
+ using Point_cloud = std::vector<Point>;
public:
/** \brief Cech_complex constructor from a list of points.
@@ -70,7 +73,7 @@ class Cech_complex {
*/
Cech_complex(const ForwardPointRange& points, Filtration_value max_radius)
: max_radius_(max_radius),
- point_cloud_(points) {
+ point_cloud_(std::begin(points), std::end(points)) {
cech_skeleton_graph_ =
Gudhi::compute_proximity_graph<SimplicialComplexForProximityGraph>(point_cloud_,
max_radius_,
@@ -115,7 +118,7 @@ class Cech_complex {
private:
Proximity_graph cech_skeleton_graph_;
Filtration_value max_radius_;
- ForwardPointRange point_cloud_;
+ Point_cloud point_cloud_;
};
} // namespace cech_complex