% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simplicial.R
\name{euler_characteristic}
\alias{euler_characteristic}
\title{Euler Characteristic}
\usage{
euler_characteristic(sc)
}
\arguments{
\item{sc}{A \code{simplicial_complex} object.}
}
\value{
Integer.
}
\description{
Computes \eqn{\chi = \sum_{k=0}^{d} (-1)^k f_k} where \eqn{f_k} is the
number of k-simplices. By the Euler-Poincare theorem,
\eqn{\chi = \sum_{k} (-1)^k \beta_k}.
}
\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)
euler_characteristic(sc)

}
