VietorisRipsComplex: Construct a Vietoris–Rips Complex (1-skeleton + maximal...

View source: R/VRComplex.R

VietorisRipsComplexR Documentation

Construct a Vietoris–Rips Complex (1-skeleton + maximal simplices)

Description

Construct a Vietoris–Rips Complex (1-skeleton + maximal simplices)

Usage

VietorisRipsComplex(points, epsilon)

Arguments

points

A numeric matrix or data.frame with one point per row (columns are coordinates).

epsilon

A positive numeric threshold; connect points with distance < \epsilon.

Details

The Vietoris–Rips complex at scale \epsilon includes a simplex for every finite set of points with pairwise distances < \epsilon. This function constructs the 1-skeleton (edges only) and then uses maximal cliques in that graph as the maximal simplices.

Value

A list with:

network

An igraph object representing the 1-skeleton.

simplices

A list of integer vectors, each the vertex indices of a maximal simplex.

Examples

points <- matrix(c(0, 1, 1, 0, 0, 0, 1, 1), ncol = 2)
epsilon <- 1.5
vr_complex <- VietorisRipsComplex(points, epsilon)

SimplicialComplex documentation built on Nov. 5, 2025, 7:40 p.m.