build_simplicial: Build a Simplicial Complex

View source: R/simplicial.R

build_simplicialR Documentation

Build a Simplicial Complex

Description

Constructs a simplicial complex from a network or higher-order pathway object. Three construction methods are available:

  • Clique complex ("clique"): every clique in the thresholded graph becomes a simplex. The standard bridge from graph theory to algebraic topology.

  • Pathway complex ("pathway"): each higher-order pathway from a net_hon or net_hypa becomes a simplex.

  • Vietoris-Rips ("vr"): nodes with edge weight \geq threshold are connected; all cliques in the resulting graph become simplices.

Usage

build_simplicial(
  x,
  type = "clique",
  threshold = 0,
  max_dim = 10L,
  max_pathways = NULL,
  ...
)

Arguments

x

A square matrix, tna, netobject, net_hon, net_hypa, or net_mogen.

type

Construction type: "clique" (default), "pathway", or "vr".

threshold

Minimum absolute edge weight to include an edge (default 0). Edges below this are ignored.

max_dim

Maximum simplex dimension (default 10). A k-simplex has k+1 nodes.

max_pathways

For type = "pathway": maximum number of pathways to include, ranked by count (HON) or ratio (HYPA). NULL includes all. Default NULL.

...

Additional arguments passed to build_hon() when x is a tna/netobject with type = "pathway".

Value

A simplicial_complex object.

See Also

betti_numbers, persistent_homology, simplicial_degree, q_analysis

Examples

mat <- matrix(c(0,.6,.5,.6,0,.4,.5,.4,0), 3, 3)
colnames(mat) <- rownames(mat) <- c("A","B","C")
sc <- build_simplicial(mat, threshold = 0.3)
print(sc)
betti_numbers(sc)


Nestimate documentation built on April 20, 2026, 5:06 p.m.