diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-08-20 14:48:28 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-08-20 14:48:28 +0000 |
commit | 56f297d7338abf37ed788cace18e883d3dde1e7f (patch) | |
tree | 802c3eb2c77149c0e33605ae9d8d8e66dd584a44 /src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h | |
parent | e734e9d6063b83f4bb389b8073e456cbba0b7f3a (diff) | |
parent | 8cdad0d3febc1de445c6581d457137b429591756 (diff) |
Merge of num_simplices branch in order to compute num_simplices instead of storing it.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@749 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: b688323cf8e741c31af23ae0fe041547ce25c8c0
Diffstat (limited to 'src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h')
-rw-r--r-- | src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index 896a7a9f..4c818ffa 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -230,9 +230,10 @@ class Persistent_cohomology { : cpx_(&cpx), dim_max_(cpx.dimension()), // upper bound on the dimension of the simplices coeff_field_(), // initialize the field coefficient structure. - ds_rank_(cpx_->num_simplices()), // union-find - ds_parent_(cpx_->num_simplices()), // union-find - ds_repr_(cpx_->num_simplices(), NULL), // union-find -> annotation vectors + num_simplices_(cpx_->num_simplices()), // num_simplices save to avoid to call thrice the function + ds_rank_(num_simplices_), // union-find + ds_parent_(num_simplices_), // union-find + ds_repr_(num_simplices_, NULL), // union-find -> annotation vectors dsets_(&ds_rank_[0], &ds_parent_[0]), // union-find cam_(), // collection of annotation vectors zero_cocycles_(), // union-find -> Simplex_key of creator for 0-homology @@ -743,6 +744,7 @@ class Persistent_cohomology { Complex_ds * cpx_; int dim_max_; CoefficientField coeff_field_; + size_t num_simplices_; /* Disjoint sets data structure to link the model of FilteredComplex * with the compressed annotation matrix. |