Learn R Programming

SimplicialComplex (version 0.1.0)

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

Description

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

Usage

VietorisRipsComplex(points, epsilon)

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.

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.

Examples

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

Run the code above in your browser using DataLab