\(\chi = \sum_k (-1)^k f_k\), the alternating sum of the number of k-simplices; by the Euler-Poincare theorem it equals the alternating sum of the Betti numbers.
Arguments
- sc
A
simplicial_complexfromsimplicial().
Examples
adj <- matrix(c(0, 1, 1, 0,
1, 0, 1, 1,
1, 1, 0, 1,
0, 1, 1, 0), 4, 4, dimnames = list(letters[1:4], letters[1:4]))
hg_euler(simplicial(adj))
#> [1] 1