diff options
Diffstat (limited to 'src/cython')
-rwxr-xr-x | src/cython/example/alpha_complex_from_points.py (renamed from src/cython/example/alpha_complex_example.py) | 10 | ||||
-rw-r--r-- | src/cython/src/cython/mini_simplex_tree.pyx | 6 | ||||
-rw-r--r-- | src/cython/src/cython/simplex_tree.pyx | 6 | ||||
-rw-r--r-- | src/cython/src/cython/witness_complex.pyx | 13 |
4 files changed, 21 insertions, 14 deletions
diff --git a/src/cython/example/alpha_complex_example.py b/src/cython/example/alpha_complex_from_points.py index cfeff5d8..da98f3d4 100755 --- a/src/cython/example/alpha_complex_example.py +++ b/src/cython/example/alpha_complex_from_points.py @@ -65,13 +65,3 @@ print("coface([0], 1)=", alpha_complex.get_coface_tree([0], 1)) print("point[0]=", alpha_complex.get_point(0)) print("point[5]=", alpha_complex.get_point(5)) - -print("betti_numbers()=") -print(alpha_complex.betti_numbers()) - -alpha_complex.initialize_filtration() -print("persistence(homology_coeff_field=2, min_persistence=0)=") -print(alpha_complex.persistence(homology_coeff_field=2, min_persistence=0)) - -print("betti_numbers()=") -print(alpha_complex.betti_numbers()) diff --git a/src/cython/src/cython/mini_simplex_tree.pyx b/src/cython/src/cython/mini_simplex_tree.pyx index c045c727..3ba7e853 100644 --- a/src/cython/src/cython/mini_simplex_tree.pyx +++ b/src/cython/src/cython/mini_simplex_tree.pyx @@ -74,6 +74,12 @@ cdef class MiniSimplexTree: cdef Mini_simplex_tree_persistence_interface * pcohptr + # Fake constructor that does nothing but documenting the constructor + def __init__(self, points=[], max_alpha_square=float('inf')): + """MiniSimplexTree constructor. + """ + + # The real cython constructor def __cinit__(self): self.thisptr = new Simplex_tree_interface_mini() diff --git a/src/cython/src/cython/simplex_tree.pyx b/src/cython/src/cython/simplex_tree.pyx index 772ea73d..bf91e812 100644 --- a/src/cython/src/cython/simplex_tree.pyx +++ b/src/cython/src/cython/simplex_tree.pyx @@ -74,6 +74,12 @@ cdef class SimplexTree: cdef Simplex_tree_persistence_interface * pcohptr + # Fake constructor that does nothing but documenting the constructor + def __init__(self, points=[], max_alpha_square=float('inf')): + """SimplexTree constructor. + """ + + # The real cython constructor def __cinit__(self): self.thisptr = new Simplex_tree_interface_full_featured() diff --git a/src/cython/src/cython/witness_complex.pyx b/src/cython/src/cython/witness_complex.pyx index bdbdc393..835244cf 100644 --- a/src/cython/src/cython/witness_complex.pyx +++ b/src/cython/src/cython/witness_complex.pyx @@ -61,14 +61,19 @@ cdef class WitnessComplex: cdef Witness_complex_interface * thisptr - def __cinit__(self, points=None, number_of_landmarks=5): + # Fake constructor that does nothing but documenting the constructor + def __init__(self, points=[], number_of_landmarks=5): """WitnessComplex constructor. - Args: - points (list): A list of points in d-Dimension. - number_of_landmarks (int): Number of landmarks to build the + :param points: A list of points in d-Dimension. + :type points: list of list of double + :param number_of_landmarks: Number of landmarks to build the WitnessComplex. + :type number_of_landmarks: int """ + + # The real cython constructor + def __cinit__(self, points=None, number_of_landmarks=5): if points is not None: self.thisptr = new Witness_complex_interface(points, number_of_landmarks) |