oineus.vr_filtration

oineus.vr_filtration(data, from_pwdists=False, max_dim=-1, max_diameter=-1.0, with_critical_edges=False, packed=True, n_threads=1)[source]

Build a Vietoris-Rips filtration from points or pairwise distances.

Construction uses the in-order generation (VRE) algorithm of Vejdemo-Johansson, Matuszewski & Bauer (“In-order generation of Vietoris-Rips Complexes”, arXiv:2411.05495).

Parameters:
  • data (np.ndarray) – (n, d) array of points, or (n, n) pairwise distance matrix.

  • from_pwdists (bool) – Treat data as a pairwise distance matrix.

  • max_dim (int) – Largest simplex dimension to enumerate. Default: data dimensionality.

  • max_diameter (float) – Truncation threshold; only simplices with diameter <= this value are kept. Default: enclosing radius of the point cloud.

  • with_critical_edges (bool) – Also return an array (one per simplex) of an edge whose length equals the simplex’s filtration value.

  • packed (bool) – Use the compact bit-packed cell encoding (the default) when the vertex ids fit a 64- or 128-bit word; falls back to the fat encoding otherwise. Pass packed=False to force the fat universal Simplex filtration.

  • n_threads (int) – Threads used for the (parallel) sort inside the Filtration ctor. Enumeration itself is single-threaded.