prepare.landmark.geodesic.kk() builds the deterministic shortest
path trees, graph-distance cache, sparse local-plus-landmark pair set, and
chosen path realizations needed to evaluate the landmark geodesic KK energy
repeatedly on the same graph. This is intended as a reusable preparation step
for experiments where many layouts of the same graph are compared.
prepare.landmark.geodesic.kk(
edges = NULL,
n = NULL,
adj_list = NULL,
weight_list = NULL,
edge_weights = NULL,
local_nbrs = 20L,
landmark_count = 8L
)A list with the sparse pair set, graph distances, chosen paths, and
other cached data. The object has class "grip_lgkk_prepared".
Two-column integer matrix of edges (1-based vertex ids).
Number of vertices. If omitted with adj_list, defaults to
length(adj_list). If omitted with edges, defaults to
max(edges).
Adjacency list (1-based) for an undirected graph.
Optional parallel list of positive edge weights.
Optional positive edge-weight vector parallel to
edges.
Number of nearest graph-metric neighbors retained per vertex.
Number of farthest-point landmarks retained per vertex.
The sparse set follows the implementation choice recorded in
landmark\_geodesic\_kk\_spec\_2026-03-30.tex: each vertex contributes
its local_nbrs nearest active vertices in graph distance and its
landmark_count farthest-point landmarks, both selected
deterministically.