% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grip_geodesic_misf_kk.R
\name{prepare.misf.geodesic.kk}
\alias{prepare.misf.geodesic.kk}
\title{Prepare a MISF-based multiscale geodesic-KK object}
\usage{
prepare.misf.geodesic.kk(
  edges = NULL,
  n = NULL,
  adj_list = NULL,
  weight_list = NULL,
  edge_weights = NULL,
  tie_mode = c("single", "average"),
  num_init = 24L,
  num_nbrs = 20L,
  dim = 2L,
  top_level_mode = c("solve", "skip"),
  top_level_pair_mode = c("auto", "full", "landmark"),
  top_level_full_limit = 512L,
  top_level_local_nbrs = 20L,
  top_level_landmark_count = 8L,
  top_level_restarts = 8L,
  top_level_max_iter = 16L,
  top_level_init = c("geometric", "cmdscale", "random"),
  seed = 6L
)
}
\arguments{
\item{edges}{Two-column integer matrix of edges (1-based vertex ids).}

\item{n}{Number of vertices. If omitted with `adj_list`, defaults to
`length(adj_list)`. If omitted with `edges`, defaults to `max(edges)`.}

\item{adj_list}{Adjacency list (1-based) for an undirected graph.}

\item{weight_list}{Optional parallel list of positive edge weights.}

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

\item{tie_mode}{Shortest-path aggregation mode inherited from
[prepare.geodesic.kk()].}

\item{num_init}{Target top-level active-set size passed to `build.misf`.}

\item{num_nbrs}{Per-level local-neighborhood schedule metadata passed to
`build.misf`.}

\item{dim}{Target embedding dimension (`2` or `3`) for the multiscale solve.}

\item{top_level_mode}{Either `"solve"` or `"skip"`. When set to `"solve"`,
the coarsest admissible MISF level is optimized immediately and stored in
`prepared$top_level_fit`.}

\item{top_level_pair_mode}{Pair policy for the top MISF level: `"auto"`,
`"full"`, or `"landmark"`.}

\item{top_level_full_limit}{Active-set size threshold used when
`top_level_pair_mode = "auto"`.}

\item{top_level_local_nbrs}{Number of nearest graph-metric neighbors retained
per vertex in the sparse top-level LGKK cache.}

\item{top_level_landmark_count}{Number of farthest-point landmarks retained
per vertex in the sparse top-level LGKK cache.}

\item{top_level_restarts}{Number of top-level restarts used by the coarse
MISF-GKK solve.}

\item{top_level_max_iter}{Top-level iteration budget.}

\item{top_level_init}{Top-level initializer (`"geometric"`, `"cmdscale"`, or
`"random"`).}

\item{seed}{Optional integer seed reused for MISF extraction.}
}
\value{
An object of class `"grip_misf_gkk_prepared"` layered on top of the
  full geodesic-KK prepared structure, with added MISF metadata, top-level
  coarse-graph caches, and stored default controls for the MISF-GKK
  optimizer.
}
\description{
`prepare.misf.geodesic.kk()` builds the prepared state for a MISF-based
geodesic-KK pipeline by layering the maximal independent set filtration
(MISF) on top of the existing full geodesic-KK cache. The prepared object
stores the graph metadata, the coarsest admissible top-level graph, the
exact and sparse top-level prepared caches, and the default controls used by
the multiscale MISF-GKK optimizer.
}
\examples{
edges <- edges.mesh(4, 4)
prepared <- prepare.misf.geodesic.kk(
  edges = edges,
  n = 16,
  tie_mode = "average",
  num_init = 4,
  top_level_mode = "skip",
  seed = 1
)
prepared$top_level_vertices
}
