summaryrefslogtreecommitdiff
path: root/src/Persistent_cohomology/include
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-11-13 20:27:56 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-11-13 20:27:56 +0000
commitbdb1e5517822d935da93d83c8950cbbd11560698 (patch)
tree87bf883c8d5a2a6c67f2b54357b68b99d5344cdb /src/Persistent_cohomology/include
parent32a6d46672102e17f7ae09fe130382aa7e487884 (diff)
Using a static variable really helps.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/annotations_in_boundary@914 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 695a6f642399c2646e5a26fac20173fbd57fe160
Diffstat (limited to 'src/Persistent_cohomology/include')
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
index 1d8c2ca2..609f40a2 100644
--- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
+++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
@@ -434,11 +434,9 @@ class Persistent_cohomology {
// with multiplicity. We used to sum the coefficients directly in
// annotations_in_boundary by using a map, we now do it later.
typedef std::pair<Column *, int> annotation_t;
- std::vector<annotation_t> annotations_in_boundary;
- /* A small speed boost is possible with the following non-thread-safe:
- static std::vector<std::pair<Column *, int>> annotations_in_boundary;
- annotations_in_boundary.clear();
- */
+ // Danger: not thread-safe!
+ static std::vector<annotation_t> annotations_in_boundary;
+ annotations_in_boundary.clear();
int sign = 1 - 2 * (dim_sigma % 2); // \in {-1,1} provides the sign in the
// alternate sum in the boundary.
Simplex_key key;