summaryrefslogtreecommitdiff
path: root/src/cython
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-12-14 14:14:31 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-12-14 14:14:31 +0000
commita07ddde0c7a12aa1ad1690d87ba105bb17356526 (patch)
tree9460b7edc36a83902cecef2a1e201a8db56f329d /src/cython
parent51d5cdbb5e0d2ac632611811435eef798e496ac6 (diff)
parentb3060b07620833d36519379acefd98c490bc4de1 (diff)
Merge of branch misc-glisse
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3074 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d0842416dbf4ee1ff25a7421841efe8f097e5379
Diffstat (limited to 'src/cython')
-rw-r--r--src/cython/cython/simplex_tree.pyx11
-rw-r--r--src/cython/include/Tangential_complex_interface.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/src/cython/cython/simplex_tree.pyx b/src/cython/cython/simplex_tree.pyx
index 8a436619..0cb575d2 100644
--- a/src/cython/cython/simplex_tree.pyx
+++ b/src/cython/cython/simplex_tree.pyx
@@ -106,8 +106,8 @@ cdef class SimplexTree:
return self.pcohptr != NULL
def filtration(self, simplex):
- """This function returns the simplicial complex filtration value for a
- given N-simplex.
+ """This function returns the filtration value for a given N-simplex in
+ this simplicial complex, or +infinity if it is not in the complex.
:param simplex: The N-simplex, represented by a list of vertex.
:type simplex: list of int.
@@ -222,14 +222,17 @@ cdef class SimplexTree:
def insert(self, simplex, filtration=0.0):
"""This function inserts the given N-simplex and its subfaces with the
- given filtration value (default value is '0.0').
+ given filtration value (default value is '0.0'). If some of those
+ simplices are already present with a higher filtration value, their
+ filtration value is lowered.
:param simplex: The N-simplex to insert, represented by a list of
vertex.
:type simplex: list of int.
:param filtration: The filtration value of the simplex.
:type filtration: float.
- :returns: true if the simplex was found, false otherwise.
+ :returns: true if the simplex was not yet in the complex, false
+ otherwise (whatever its original filtration value).
:rtype: bool
"""
cdef vector[int] csimplex
diff --git a/src/cython/include/Tangential_complex_interface.h b/src/cython/include/Tangential_complex_interface.h
index ecf014b3..0c3a510e 100644
--- a/src/cython/include/Tangential_complex_interface.h
+++ b/src/cython/include/Tangential_complex_interface.h
@@ -105,7 +105,7 @@ class Tangential_complex_interface {
}
void create_simplex_tree(Simplex_tree<>* simplex_tree) {
- int max_dim = tangential_complex_->create_complex<Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_full_featured>>(*simplex_tree);
+ tangential_complex_->create_complex<Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_full_featured>>(*simplex_tree);
simplex_tree->initialize_filtration();
}