`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.
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
- edges
Two-column integer matrix of undirected edges (1-based vertex ids).
- n
Number of vertices.
- adj_list
Optional adjacency list (1-based integer vectors).
- weight_list
Optional positive edge-weight list parallel to `adj_list`.
- edge_weights
Optional positive vector parallel to `edges`.
- 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)`.
- num_nbrs
Retained local neighborhood budget per MISF level, matching the current GRIP refinement schedule metadata.
- seed
Optional integer seed passed to the current GRIP graph RNG.
Value
An object of class `"grip_misf"` containing:
- levels
Named list `V0, V1, ...` of nested vertex sets (1-based).
- vertex_depth
Integer vector giving the highest MISF level containing each vertex.
- mish_order
The internal GRIP MISF order (1-based vertex ids).
- misf_size
Sizes of the nested levels.
- num_nbrs_schedule
Per-level retained neighborhood counts used by the current GRIP engine.
- misf_height
Highest MISF level index.
- top_level_size
Size of the highest MISF level.
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
#> [1] 16 6
misf$levels[[1L]]
#> [1] 13 6 15 1 12 3 10 7 14 11 16 9 2 8 5 4