From 0181c1f8c6122c50f991abea1ec8c4ec6bf392b4 Mon Sep 17 00:00:00 2001 From: pdlotko Date: Wed, 13 Jan 2016 07:39:34 +0000 Subject: First version of a code changed so that it computes persistence of cubical complexes with or without periodic boundary conditions, but do not require duplication of code that link it to Gudhi persistence engine. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bitmap@961 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 506db0edd18818287fe110dcd04c15e369b28171 --- src/Bitmap_cubical_complex/example/Bitmap_cubical_complex.cpp | 4 ++-- .../Bitmap_cubical_complex_periodic_boundary_conditions.cpp | 11 +++++++---- .../example/Random_bitmap_cubical_complex.cpp | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src/Bitmap_cubical_complex') diff --git a/src/Bitmap_cubical_complex/example/Bitmap_cubical_complex.cpp b/src/Bitmap_cubical_complex/example/Bitmap_cubical_complex.cpp index ed141ed9..39a55f24 100644 --- a/src/Bitmap_cubical_complex/example/Bitmap_cubical_complex.cpp +++ b/src/Bitmap_cubical_complex/example/Bitmap_cubical_complex.cpp @@ -54,11 +54,11 @@ lexicographical order. See CubicalOneSphere.txt or CubicalTwoSphere.txt for exam return 1; } - Bitmap_cubical_complex b( argv[1] ); + Bitmap_cubical_complex< Bitmap_cubical_complex_base > b( argv[1] ); // Compute the persistence diagram of the complex - persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex, Field_Zp > pcoh(b); + persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex< Bitmap_cubical_complex_base >, Field_Zp > pcoh(b); pcoh.init_coefficients( p ); //initilizes the coefficient field for homology pcoh.compute_persistent_cohomology( min_persistence ); diff --git a/src/Bitmap_cubical_complex/example/Bitmap_cubical_complex_periodic_boundary_conditions.cpp b/src/Bitmap_cubical_complex/example/Bitmap_cubical_complex_periodic_boundary_conditions.cpp index fa60d4f3..3d80c96d 100644 --- a/src/Bitmap_cubical_complex/example/Bitmap_cubical_complex_periodic_boundary_conditions.cpp +++ b/src/Bitmap_cubical_complex/example/Bitmap_cubical_complex_periodic_boundary_conditions.cpp @@ -22,10 +22,10 @@ #include -#include +#include +#include #include - using namespace Gudhi; using namespace Gudhi::Cubical_complex; using namespace Gudhi::persistent_cohomology; @@ -53,11 +53,14 @@ lexicographical order. See CubicalOneSphere.txt or CubicalTwoSphere.txt for exam return 1; } - Bitmap_cubical_complex_periodic_boundary_conditions b( argv[1] ); + Bitmap_cubical_complex< Bitmap_cubical_complex_periodic_boundary_conditions_base > b( argv[1] ); // Compute the persistence diagram of the complex - persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex_periodic_boundary_conditions, Field_Zp > pcoh(b,true); + persistent_cohomology::Persistent_cohomology< + Bitmap_cubical_complex< Bitmap_cubical_complex_periodic_boundary_conditions_base > + , Field_Zp + > pcoh(b,true); pcoh.init_coefficients( p ); //initilizes the coefficient field for homology pcoh.compute_persistent_cohomology( min_persistence ); diff --git a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp index 36c22344..97347162 100644 --- a/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp +++ b/src/Bitmap_cubical_complex/example/Random_bitmap_cubical_complex.cpp @@ -74,11 +74,11 @@ The program will create random cubical complex of that sizes and compute persist - Bitmap_cubical_complex b( sizes , data ); + Bitmap_cubical_complex< Bitmap_cubical_complex_base > b( sizes , data ); // Compute the persistence diagram of the complex - persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex, Field_Zp > pcoh(b); + persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex< Bitmap_cubical_complex_base >, Field_Zp > pcoh(b); pcoh.init_coefficients( p ); //initilizes the coefficient field for homology pcoh.compute_persistent_cohomology( min_persistence ); -- cgit v1.2.3