% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simplicial.R
\name{build_simplicial}
\alias{build_simplicial}
\title{Build a Simplicial Complex}
\usage{
build_simplicial(
  x,
  type = "clique",
  threshold = 0,
  max_dim = 10L,
  max_pathways = NULL,
  ...
)
}
\arguments{
\item{x}{A square matrix, \code{tna}, \code{netobject},
\code{net_hon}, \code{net_hypa}, or \code{net_mogen}.}

\item{type}{Construction type: \code{"clique"} (default),
\code{"pathway"}, or \code{"vr"}.}

\item{threshold}{Minimum absolute edge weight to include an edge
(default 0). Edges below this are ignored.}

\item{max_dim}{Maximum simplex dimension (default 10). A k-simplex
has k+1 nodes.}

\item{max_pathways}{For \code{type = "pathway"}: maximum number of
pathways to include, ranked by count (HON) or ratio (HYPA).
\code{NULL} includes all. Default \code{NULL}.}

\item{...}{Additional arguments passed to \code{build_hon()} when
\code{x} is a \code{tna}/\code{netobject} with \code{type = "pathway"}.}
}
\value{
A \code{simplicial_complex} object.
}
\description{
Constructs a simplicial complex from a network or higher-order pathway
object. Three construction methods are available:

\itemize{
\item \strong{Clique complex} (\code{"clique"}): every clique in the
thresholded graph becomes a simplex. The standard bridge from graph
theory to algebraic topology.
\item \strong{Pathway complex} (\code{"pathway"}): each higher-order
pathway from a \code{net_hon} or \code{net_hypa} becomes a simplex.
\item \strong{Vietoris-Rips} (\code{"vr"}): nodes with edge weight
\eqn{\geq} \code{threshold} are connected; all cliques in the
resulting graph become simplices.
}
}
\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)
print(sc)
betti_numbers(sc)

}
\seealso{
\code{\link{betti_numbers}}, \code{\link{persistent_homology}},
\code{\link{simplicial_degree}}, \code{\link{q_analysis}}
}
