summaryrefslogtreecommitdiff
path: root/src/cython/cython
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-06-12 07:43:43 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-06-12 07:43:43 +0200
commitc65eba306f7fe2777f8851edb9fcb2d2592c27d2 (patch)
tree859605631b2560b22fdc51c450bf83912c2fca39 /src/cython/cython
parent7e8685458f684f347b2aa6a77a288c249c722f25 (diff)
parentf58f0bb2cb99076d0cd3a11ad39f3277213e3f5e (diff)
Merge branch 'master' into persistence_intervals_numpy_arrays_vincent
Diffstat (limited to 'src/cython/cython')
-rw-r--r--src/cython/cython/simplex_tree.pyx8
-rw-r--r--src/cython/cython/strong_witness_complex.pyx12
-rw-r--r--src/cython/cython/witness_complex.pyx12
3 files changed, 18 insertions, 14 deletions
diff --git a/src/cython/cython/simplex_tree.pyx b/src/cython/cython/simplex_tree.pyx
index ee04589e..43bc11c9 100644
--- a/src/cython/cython/simplex_tree.pyx
+++ b/src/cython/cython/simplex_tree.pyx
@@ -407,7 +407,8 @@ cdef class SimplexTree:
"""This function ensures that each simplex has a higher filtration
value than its faces by increasing the filtration values.
- :returns: The filtration modification information.
+ :returns: True if any filtration value was modified,
+ False if the filtration was already non-decreasing.
:rtype: bool
@@ -515,10 +516,9 @@ cdef class SimplexTree:
return np_array(intervals_result)
def persistence_pairs(self):
- """This function returns the persistence pairs of the simplicial
- complex.
+ """This function returns a list of persistence birth and death simplices pairs.
- :returns: The persistence intervals.
+ :returns: A list of persistence simplices intervals.
:rtype: list of pair of list of int
:note: persistence_pairs function requires
diff --git a/src/cython/cython/strong_witness_complex.pyx b/src/cython/cython/strong_witness_complex.pyx
index 74c5cb05..4b7bff34 100644
--- a/src/cython/cython/strong_witness_complex.pyx
+++ b/src/cython/cython/strong_witness_complex.pyx
@@ -47,8 +47,10 @@ cdef class StrongWitnessComplex:
def __init__(self, nearest_landmark_table=None):
"""StrongWitnessComplex constructor.
- :param nearest_landmark_table: A list of nearest landmark.
- :type nearest_landmark_table: list of list of pair of unsigned and double
+ :param nearest_landmark_table: A list of lists of nearest landmarks and their distances.
+ `nearest_landmark_table[w][k]==(l,d)` means that l is the k-th nearest landmark to
+ witness w, and d is the (squared) distance between l and w.
+ :type nearest_landmark_table: list of list of pair of int and float
"""
# The real cython constructor
@@ -65,10 +67,10 @@ cdef class StrongWitnessComplex:
"""
return self.thisptr != NULL
- def create_simplex_tree(self, max_alpha_square, limit_dimension = -1):
+ def create_simplex_tree(self, max_alpha_square = float('inf'), limit_dimension = -1):
"""
- :param max_alpha_square: The maximum alpha square threshold the
- simplices shall not exceed. Default is set to infinity.
+ :param max_alpha_square: The maximum relaxation parameter.
+ Default is set to infinity.
:type max_alpha_square: float
:returns: A simplex tree created from the Delaunay Triangulation.
:rtype: SimplexTree
diff --git a/src/cython/cython/witness_complex.pyx b/src/cython/cython/witness_complex.pyx
index 8591465a..b1cce83f 100644
--- a/src/cython/cython/witness_complex.pyx
+++ b/src/cython/cython/witness_complex.pyx
@@ -47,8 +47,10 @@ cdef class WitnessComplex:
def __init__(self, nearest_landmark_table=None):
"""WitnessComplex constructor.
- :param nearest_landmark_table: A list of nearest landmark.
- :type nearest_landmark_table: list of list of pair of unsigned and double
+ :param nearest_landmark_table: A list of lists of nearest landmarks and their distances.
+ `nearest_landmark_table[w][k]==(l,d)` means that l is the k-th nearest landmark to
+ witness w, and d is the (squared) distance between l and w.
+ :type nearest_landmark_table: list of list of pair of int and float
"""
# The real cython constructor
@@ -65,10 +67,10 @@ cdef class WitnessComplex:
"""
return self.thisptr != NULL
- def create_simplex_tree(self, max_alpha_square, limit_dimension = -1):
+ def create_simplex_tree(self, max_alpha_square = float('inf'), limit_dimension = -1):
"""
- :param max_alpha_square: The maximum alpha square threshold the
- simplices shall not exceed. Default is set to infinity.
+ :param max_alpha_square: The maximum relaxation parameter.
+ Default is set to infinity.
:type max_alpha_square: float
:returns: A simplex tree created from the Delaunay Triangulation.
:rtype: SimplexTree