diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-28 10:32:51 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-28 10:32:51 +0000 |
commit | 4540f8841fa9b8846012dc3cc7e8a20007d1a97f (patch) | |
tree | 4cdd6f0861eca43e1583948c471a0b9679759c36 /src/Persistent_cohomology/example/plain_homology.cpp | |
parent | f0e209149a6bf1d3b13572f3704986a429130a48 (diff) | |
parent | 6ed42daddfede2288bc02ab2e98fc12b47cac74e (diff) |
Merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@2263 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 9b430e79ecc94bee975d748eb3e2106c7dbab3ce
Diffstat (limited to 'src/Persistent_cohomology/example/plain_homology.cpp')
-rw-r--r-- | src/Persistent_cohomology/example/plain_homology.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Persistent_cohomology/example/plain_homology.cpp b/src/Persistent_cohomology/example/plain_homology.cpp index ae82c817..50f692f2 100644 --- a/src/Persistent_cohomology/example/plain_homology.cpp +++ b/src/Persistent_cohomology/example/plain_homology.cpp @@ -27,13 +27,11 @@ #include <vector> #include <cstdint> // for std::uint8_t -using namespace Gudhi; - /* We could perfectly well use the default Simplex_tree<> (which uses * Simplex_tree_options_full_featured), the following simply demonstrates * how to save on storage by not storing a filtration value. */ -struct MyOptions : Simplex_tree_options_full_featured { +struct MyOptions : Gudhi::Simplex_tree_options_full_featured { // Implicitly use 0 as filtration value for all simplices static const bool store_filtration = false; // The persistence algorithm needs this @@ -43,7 +41,10 @@ struct MyOptions : Simplex_tree_options_full_featured { // Maximum number of simplices to compute persistence is 2^8 - 1 = 255. One is reserved for null_key typedef std::uint8_t Simplex_key; }; -typedef Simplex_tree<MyOptions> ST; + +using ST = Gudhi::Simplex_tree<MyOptions>; +using Field_Zp = Gudhi::persistent_cohomology::Field_Zp; +using Persistent_cohomology = Gudhi::persistent_cohomology::Persistent_cohomology<ST, Field_Zp>; int main() { ST st; @@ -70,7 +71,7 @@ int main() { st.initialize_filtration(); // Class for homology computation - persistent_cohomology::Persistent_cohomology<ST, persistent_cohomology::Field_Zp> pcoh(st); + Persistent_cohomology pcoh(st); // Initialize the coefficient field Z/2Z for homology pcoh.init_coefficients(2); |