% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CompareComplexes.R
\name{compare_complexes}
\alias{compare_complexes}
\title{Compare simplicial complex constructions on one point cloud}
\usage{
compare_complexes(
  points,
  methods = c("VR", "Delaunay", "Alpha", "Cech", "Witness"),
  eps_max = NULL,
  landmarks = NULL,
  nu = 1
)
}
\arguments{
\item{points}{A numeric matrix or data.frame, one point per row.}

\item{methods}{Character vector of methods to compare, any subset of
\code{"VR"}, \code{"Delaunay"}, \code{"Alpha"}, \code{"Cech"},
\code{"Witness"}. Defaults to all five.}

\item{eps_max}{Maximum scale, passed to \code{\link{build_filtration}}.
Required whenever \code{methods} includes \code{"VR"}, \code{"Cech"} or
\code{"Witness"}; optional for \code{"Alpha"} (defaults to \code{Inf});
ignored for \code{"Delaunay"}.}

\item{landmarks}{Passed to \code{\link{build_filtration}} for
\code{"Witness"}. If \code{NULL} and \code{"Witness"} is included,
defaults to \code{min(30, nrow(points))} landmarks via
\code{\link{generate_landmarks}}, with a message.}

\item{nu}{Passed to \code{\link{build_filtration}} for \code{"Witness"}.}
}
\value{
A list with:
\describe{
  \item{summary}{A data frame, one row per method, with the number of
    vertices and simplices, the highest simplex dimension reached, build
    and persistence-computation time in seconds, and the number of
    finite/essential persistence pairs found.}
  \item{diagrams}{A named list of persistence diagram data frames (one per
    method, from \code{\link{persistence_pairs}}), for further comparison
    (e.g. with \code{\link{wasserstein_distance}}/
    \code{\link{bottleneck_distance}}, or \code{\link{plot_persistence}}).}
  \item{filtrations}{A named list of the raw filtration lists.}
}
}
\description{
Builds the same point cloud's filtration under several
\code{\link{build_filtration}} methods and summarizes, side by side, how
expensive each one was to build and what persistent homology it found -
useful for seeing directly how Cech's dimension blow-up, Alpha's
Delaunay-bounded dimension, VR's cheap-but-approximate cliques, and
Witness's landmark subsampling trade off against each other on the same
data (see Otter et al. (2017), Section 5.2, for the underlying
trade-offs).
}
\examples{
points <- matrix(c(0, 1, 1, 0, 0, 0, 1, 1, 0.5, 0.5), ncol = 2, byrow = TRUE)
cmp <- compare_complexes(points, methods = c("VR", "Alpha", "Delaunay"), eps_max = 1.2)
cmp$summary
}
