| faces | R Documentation |
Generate all unique faces of a given dimension from simplices
faces(simplices, target_dim)
simplices |
A list of simplices (each a numeric vector). |
target_dim |
The target dimension |
The function generates all possible subsets (combinations) of each simplex, removes duplicates,
and filters them to only include those of length target_dim + 1.
For example, a 2-simplex c(1, 2, 3) has three 1-dimensional faces (edges):
c(1,2), c(1,3), and c(2,3), and three 0-dimensional faces (vertices):
1, 2, and 3.
A list of faces (each a numeric vector) of dimension target_dim.
simplices <- list(c(1, 2), c(3, 4), c(2, 1, 3), c(4, 2))
faces(simplices, target_dim=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.