% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grip_misf.R
\name{build.misf}
\alias{build.misf}
\title{Build a maximal independent set filtration (MISF) for a graph}
\usage{
build.misf(
  edges = NULL,
  n = NULL,
  adj_list = NULL,
  weight_list = NULL,
  edge_weights = NULL,
  num_init = 24L,
  num_nbrs = 20L,
  seed = 6L
)
}
\arguments{
\item{edges}{Two-column integer matrix of undirected edges (1-based vertex
ids).}

\item{n}{Number of vertices.}

\item{adj_list}{Optional adjacency list (1-based integer vectors).}

\item{weight_list}{Optional positive edge-weight list parallel to `adj_list`.}

\item{edge_weights}{Optional positive vector parallel to `edges`.}

\item{num_init}{Target top-level active-set size used by the current GRIP
MISF builder. The returned highest MISF level has size at most
`min(num_init, n)`.}

\item{num_nbrs}{Retained local neighborhood budget per MISF level, matching
the current GRIP refinement schedule metadata.}

\item{seed}{Optional integer seed passed to the current GRIP graph RNG.}
}
\value{
An object of class `"grip_misf"` containing:
\describe{
  \item{levels}{Named list `V0, V1, ...` of nested vertex sets (1-based).}
  \item{vertex_depth}{Integer vector giving the highest MISF level containing
  each vertex.}
  \item{mish_order}{The internal GRIP MISF order (1-based vertex ids).}
  \item{misf_size}{Sizes of the nested levels.}
  \item{num_nbrs_schedule}{Per-level retained neighborhood counts used by the
  current GRIP engine.}
  \item{misf_height}{Highest MISF level index.}
  \item{top_level_size}{Size of the highest MISF level.}
}
}
\description{
`build.misf()` exposes the maximal independent set filtration already
constructed internally by the GRIP layout engine. The result is graph-first:
you can supply either an edge list plus `n`, or an adjacency/weight-list
pair.
}
\details{
The current implementation returns the same MISF structure used by GRIP's
multiscale layout core. Edge weights are accepted and passed through the
underlying graph object, but the current MISF construction itself is driven
by the graph topology and hop-distance thresholds rather than weighted
shortest-path distances.
}
\examples{
edges <- edges.mesh(4, 4)
misf <- build.misf(edges = edges, n = 16, num_init = 6, seed = 1)
misf$misf_size
misf$levels[[1L]]
}
