prepare.landmark.geodesic.kk: Prepare sparse landmark-geodesic KK data for repeated layout evaluation
Description
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.
A list with the sparse pair set, graph distances, chosen paths, and
other cached data. The object has class "grip_lgkk_prepared".
Arguments
edges
Two-column integer matrix of edges (1-based vertex ids).
n
Number of vertices. If omitted with adj_list, defaults to
length(adj_list). If omitted with edges, defaults to
max(edges).
adj_list
Adjacency list (1-based) for an undirected graph.
weight_list
Optional parallel list of positive edge weights.
edge_weights
Optional positive edge-weight vector parallel to
edges.
local_nbrs
Number of nearest graph-metric neighbors retained per
vertex.
landmark_count
Number of farthest-point landmarks retained per vertex.
Details
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.