summaryrefslogtreecommitdiff
path: root/src/Persistent_cohomology/example/plain_homology.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-24 10:16:44 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-24 10:16:44 +0000
commitc17e58a6434e17e361b39b91ca344b8eedb197ef (patch)
tree2f50bdceb9387e42629f10ce1bd8500b98edcf0d /src/Persistent_cohomology/example/plain_homology.cpp
parent0e33927bb4feff77965b86a8da0ea0f7346e2ccd (diff)
cpplint fixes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2232 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ac02d5dd3b2aedd4795f775c228fe5ef7e1b3320
Diffstat (limited to 'src/Persistent_cohomology/example/plain_homology.cpp')
-rw-r--r--src/Persistent_cohomology/example/plain_homology.cpp11
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);