diff options
author | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-01-13 07:39:34 +0000 |
---|---|---|
committer | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-01-13 07:39:34 +0000 |
commit | 0181c1f8c6122c50f991abea1ec8c4ec6bf392b4 (patch) | |
tree | bd8bb1d5eddc0ebed12aa01466336d9726814ce0 | |
parent | 28d0848f733f0dc6a019b3328c80168d10e0a5ae (diff) |
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
3 files changed, 11 insertions, 8 deletions
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<double> b( argv[1] );
+ Bitmap_cubical_complex< Bitmap_cubical_complex_base<double> > b( argv[1] );
// Compute the persistence diagram of the complex
- persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex<double>, Field_Zp > pcoh(b);
+ persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex< Bitmap_cubical_complex_base<double> >, 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 <gudhi/reader_utils.h>
-#include <gudhi/Bitmap_cubical_complex_periodic_boundary_conditions.h>
+#include <gudhi/Bitmap_cubical_complex.h>
+#include <gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h>
#include <gudhi/Persistent_cohomology.h>
-
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<double> b( argv[1] );
+ Bitmap_cubical_complex< Bitmap_cubical_complex_periodic_boundary_conditions_base<double> > b( argv[1] );
// Compute the persistence diagram of the complex
- persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex_periodic_boundary_conditions<double>, Field_Zp > pcoh(b,true);
+ persistent_cohomology::Persistent_cohomology<
+ Bitmap_cubical_complex< Bitmap_cubical_complex_periodic_boundary_conditions_base<double> >
+ , 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<double> b( sizes , data ); + Bitmap_cubical_complex< Bitmap_cubical_complex_base<double> > b( sizes , data ); // Compute the persistence diagram of the complex - persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex<double>, Field_Zp > pcoh(b); + persistent_cohomology::Persistent_cohomology< Bitmap_cubical_complex< Bitmap_cubical_complex_base<double> >, Field_Zp > pcoh(b); pcoh.init_coefficients( p ); //initilizes the coefficient field for homology pcoh.compute_persistent_cohomology( min_persistence ); |