R/simplicial.R
betti_numbers.Rd
Computes Betti numbers: \(\beta_0\) (components), \(\beta_1\) (loops), \(\beta_2\) (voids), etc.
betti_numbers(sc)
A simplicial_complex object.
simplicial_complex
Named integer vector c(b0 = ..., b1 = ..., ...).
c(b0 = ..., b1 = ..., ...)
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) betti_numbers(sc) #> b0 b1 b2 #> 1 0 0