From e8e889c52c96a3055a1237c389186cb08b0f6708 Mon Sep 17 00:00:00 2001 From: salinasd Date: Tue, 27 Jan 2015 15:09:04 +0000 Subject: critical poitns git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@432 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 27e660f593f25a00cbd8b1794ed83bb76fd34eea --- src/GudhUI/utils/K_nearest_builder.h | 5 +++-- src/GudhUI/utils/Persistence_compute.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/GudhUI/utils') diff --git a/src/GudhUI/utils/K_nearest_builder.h b/src/GudhUI/utils/K_nearest_builder.h index f31e6c0c..b65a79e0 100644 --- a/src/GudhUI/utils/K_nearest_builder.h +++ b/src/GudhUI/utils/K_nearest_builder.h @@ -27,7 +27,7 @@ private: typedef Geometry_trait Kernel; typedef Point Point_d; - typedef boost::tuple Point_d_with_id; + typedef boost::tuple Point_d_with_id; typedef CGAL::Search_traits_d Traits_base; typedef CGAL::Search_traits_adapter, Traits_base> Traits; typedef CGAL::Orthogonal_k_neighbor_search Neighbor_search; @@ -64,10 +64,11 @@ private: Tree tree(points_with_id.begin(),points_with_id.end()); + typedef typename SkBlComplex::Vertex_handle Vertex_handle; for (auto p : complex_.vertex_range()){ Neighbor_search search(tree, complex_.point(p),k+1); for(auto it = ++search.begin(); it != search.end(); ++it){ - auto q = boost::get<1>(it->first); + Vertex_handle q(boost::get<1>(it->first)); if (p != q && complex_.contains_vertex(p) && complex_.contains_vertex(q)) complex_.add_edge(p,q); } diff --git a/src/GudhUI/utils/Persistence_compute.h b/src/GudhUI/utils/Persistence_compute.h index 7b310e5c..0ddc205a 100644 --- a/src/GudhUI/utils/Persistence_compute.h +++ b/src/GudhUI/utils/Persistence_compute.h @@ -89,6 +89,8 @@ public: pcoh.init_coefficients( params.p ); //initilizes the coefficient field for homology pcoh.compute_persistent_cohomology( INFINITY ); //put params.min_persistence stream_<<"persistence: \n"; + stream_<<"p dimension birth death: \n"; + pcoh.output_diagram(stream_); } -- cgit v1.2.3