Rips complex reference manual

class gudhi.RipsComplex

Bases: object

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__()

RipsComplex constructor.

Parameters
  • max_edge_length (float) – Rips value.

  • points (list of list of float) – A list of points in d-Dimension.

Or

Parameters

distance_matrix – A distance matrix (full square or lower triangular).

And in both cases

Parameters

sparse (float) – If this is not None, it switches to building a sparse Rips and represents the approximation parameter epsilon.

create_simplex_tree()
Parameters

max_dimension (int) – graph expansion for Rips until this given maximal dimension.

Returns

A simplex tree encoding the Vietoris–Rips filtration.

Return type

SimplexTree

Weighted Rips complex reference manual

class gudhi.weighted_rips_complex.WeightedRipsComplex(distance_matrix, weights=None, max_filtration=inf)[source]

Bases: object

Class to generate a weighted Rips complex from a distance matrix and weights on vertices, 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.

__init__(distance_matrix, weights=None, max_filtration=inf)[source]
Parameters
  • distance_matrix (Sequence[Sequence[float]]) – distance matrix (full square or lower triangular).

  • weights (Sequence[float]) – (one half of) weight for each vertex.

  • max_filtration (float) – specifies the maximal filtration value to be considered.

create_simplex_tree(max_dimension)[source]
Parameters

max_dimension (int) – graph expansion until this given dimension.

DTM Rips complex reference manual

class gudhi.dtm_rips_complex.DTMRipsComplex(points=None, distance_matrix=None, k=1, q=2, max_filtration=inf)[source]

Bases: gudhi.weighted_rips_complex.WeightedRipsComplex

Class 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: SciPy

__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.