Rips complex reference manual#
Tip
If you only want to compute persistent homology, consider using RipsPersistence,
which can be significantly faster than RipsComplex in some cases.
- class gudhi.RipsComplex[source]#
The data structure is a one skeleton graph, or Rips graph, containing edges when the edge length is less or equal to a given threshold. Edge length is computed from a user given point cloud with a given distance function, or a distance matrix.
- __init__(*, points=[], distance_matrix=[], max_edge_length=inf, sparse=None)[source]#
RipsComplex constructor.
- Parameters:
points¶ (Sequence[Sequence[float]] or any array like object of ndim 2 and dtype convertible to float.) – A list of points in d-Dimension.
Or
- Parameters:
distance_matrix¶ (Sequence[Sequence[float]] (square or just the lower triangle) or any square array like object of dtype convertible to float.) – A distance matrix (full square or lower triangular).
And in both cases
Weighted Rips complex reference manual#
- class gudhi.weighted_rips_complex.WeightedRipsComplex[source]#
Class to generate a weighted Rips complex from a distance matrix and weights on vertices, in the way described in [1] with p=1. The filtration value of vertex i is 2*weights[i], and the filtration value of edge ij is distance_matrix[i][j]+weights[i]+weights[j], or the maximum of the filtrations of its extremities, whichever is largest. Remark that all the filtration values are doubled compared to the definition in the paper for consistency with RipsComplex.
DTM Rips complex reference manual#
- class gudhi.dtm_rips_complex.DTMRipsComplex[source]#
Bases:
WeightedRipsComplexClass to generate a DTM Rips complex from a distance matrix or a point set, in the way described in [1]. Remark that all the filtration values are doubled compared to the definition in the paper for the consistency with RipsComplex.
- Requires:
- __init__(points=None, distance_matrix=None, k=1, q=2, max_filtration=inf)[source]#
- Parameters:
points¶ (numpy.ndarray) – array of points.
distance_matrix¶ (numpy.ndarray) – full distance matrix.
k¶ (int) – number of neighbors for the computation of DTM. Defaults to 1, which is equivalent to the usual Rips complex.
q¶ (float) – order used to compute the distance to measure. Defaults to 2.
max_filtration¶ (float) – specifies the maximal filtration value to be considered.