diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-11-23 16:35:23 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-11-23 16:35:23 +0000 |
commit | b3c3e0d75c717dbd94caf96c9ba827fb17b4d5b3 (patch) | |
tree | d4e706c81d54f54438aa681cd666e3854a80a37b /src/Contraction/include | |
parent | fe78c077b00e91b3d316f1d64541008a615664e7 (diff) | |
parent | 061e43a2a48525bc5a69482a1ea80f20ff505e55 (diff) |
Backmerge of trunk
Add alpha complex in bibtex
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@929 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: c8975be439b3e9e91d1fd6ad988db12c75d0395b
Diffstat (limited to 'src/Contraction/include')
-rw-r--r-- | src/Contraction/include/gudhi/Edge_contraction.h | 4 | ||||
-rw-r--r-- | src/Contraction/include/gudhi/Skeleton_blocker_contractor.h | 11 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/Contraction/include/gudhi/Edge_contraction.h b/src/Contraction/include/gudhi/Edge_contraction.h index 011ca9bd..a4c786be 100644 --- a/src/Contraction/include/gudhi/Edge_contraction.h +++ b/src/Contraction/include/gudhi/Edge_contraction.h @@ -158,7 +158,7 @@ void build_rips(ComplexType& complex, double offset){ for (auto p = vertices.begin(); p != vertices.end(); ++p) for (auto q = p; ++q != vertices.end(); ) if (eucl_distance(complex.point(*p), complex.point(*q)) < 2 * offset) - complex.add_edge(*p,*q); + complex.add_edge_without_blockers(*p,*q); } int main (int argc, char *argv[]) @@ -194,7 +194,7 @@ int main (int argc, char *argv[]) contractor.contract_edges(); std::cout << "Counting final number of simplices \n"; - unsigned num_simplices = std::distance(complex.simplex_range().begin(),complex.simplex_range().end()); + unsigned num_simplices = std::distance(complex.star_simplex_range().begin(),complex.star_simplex_range().end()); std::cout << "Final complex has "<< complex.num_vertices()<<" vertices, "<< diff --git a/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h b/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h index 47d798c0..f650473a 100644 --- a/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h +++ b/src/Contraction/include/gudhi/Skeleton_blocker_contractor.h @@ -107,13 +107,8 @@ typename GeometricSimplifiableComplex::Vertex_handle> { public: typedef typename GeometricSimplifiableComplex::Graph_vertex Graph_vertex; typedef typename GeometricSimplifiableComplex::Vertex_handle Vertex_handle; - typedef typename GeometricSimplifiableComplex::Simplex_handle Simplex_handle; - typedef typename GeometricSimplifiableComplex::Simplex_handle_iterator Simplex_handle_iterator; - - - + typedef typename GeometricSimplifiableComplex::Simplex Simplex; typedef typename GeometricSimplifiableComplex::Root_vertex_handle Root_vertex_handle; - typedef typename GeometricSimplifiableComplex::Graph_edge Graph_edge; typedef typename GeometricSimplifiableComplex::Edge_handle Edge_handle; typedef typename GeometricSimplifiableComplex::Point Point; @@ -535,14 +530,14 @@ typename GeometricSimplifiableComplex::Vertex_handle> { * All the edges that passes through the blocker may be edge-contractible * again and are thus reinserted in the heap. */ - void on_delete_blocker(const Simplex_handle * blocker) override { + void on_delete_blocker(const Simplex * blocker) override { // we go for all pairs xy that belongs to the blocker // note that such pairs xy are necessarily edges of the complex // by definition of a blocker // todo uniqument utile pour la link condition // laisser a l'utilisateur ? booleen update_heap_on_removed_blocker? - Simplex_handle blocker_copy(*blocker); + Simplex blocker_copy(*blocker); for (auto x = blocker_copy.begin(); x != blocker_copy.end(); ++x) { for (auto y = x; ++y != blocker_copy.end();) { auto edge_descr(complex_[std::make_pair(*x, *y)]); |