summaryrefslogtreecommitdiff
path: root/src/cython/cython/simplex_tree.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'src/cython/cython/simplex_tree.pyx')
-rw-r--r--src/cython/cython/simplex_tree.pyx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cython/cython/simplex_tree.pyx b/src/cython/cython/simplex_tree.pyx
index 9204d7c6..ff12dd48 100644
--- a/src/cython/cython/simplex_tree.pyx
+++ b/src/cython/cython/simplex_tree.pyx
@@ -37,6 +37,7 @@ cdef extern from "Simplex_tree_interface.h" namespace "Gudhi":
cdef cppclass Simplex_tree_interface_full_featured "Gudhi::Simplex_tree_interface<Gudhi::Simplex_tree_options_full_featured>":
Simplex_tree()
double simplex_filtration(vector[int] simplex)
+ void assign_simplex_filtration(vector[int] simplex, double filtration)
void initialize_filtration()
int num_vertices()
int num_simplices()
@@ -115,6 +116,17 @@ cdef class SimplexTree:
"""
return self.thisptr.simplex_filtration(simplex)
+ def assign_filtration(self, simplex, filtration):
+ """This function assigns the simplicial complex filtration value for a
+ given N-simplex.
+
+ :param simplex: The N-simplex, represented by a list of vertex.
+ :type simplex: list of int.
+ :param filtration: The simplicial complex filtration value.
+ :type filtration: float
+ """
+ self.thisptr.assign_simplex_filtration(simplex, filtration)
+
def initialize_filtration(self):
"""This function initializes and sorts the simplicial complex
filtration vector.