Skip to contents

\(\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.

Usage

hg_euler(sc)

Arguments

sc

A simplicial_complex from simplicial().

Value

A single integer.

References

Hatcher, A. (2002). Algebraic Topology. Cambridge University Press.

See also

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