landmark.geodesic.kk() applies a deterministic
warm-started gradient-descent polish under the sparse landmark geodesic KK
energy. It starts from an existing layout and refines it, rather than
replacing the full multiscale GRIP refinement pipeline.
landmark.geodesic.kk(
coords,
prepared = NULL,
edges = NULL,
n = NULL,
adj_list = NULL,
weight_list = NULL,
edge_weights = NULL,
local_nbrs = 20L,
landmark_count = 8L,
max_iter = 16L,
stiffness = 1,
distance_floor = 1e-08,
edge_length_epsilon = 1e-08,
initial_step = 1,
step_shrink = 0.5,
armijo_factor = 1e-04,
grad_tol = 1e-08,
min_step = 1e-08,
recenter = TRUE,
return_trace = FALSE
)A list with coords, trace, frames,
prepared, and score.
Numeric coordinate matrix with 2 or 3 columns.
Optional object returned by
prepare.landmark.geodesic.kk().
Two-column integer matrix of edges (1-based vertex ids).
Number of vertices.
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 when prepared is not supplied.
Number of farthest-point landmarks retained per vertex
when prepared is not supplied.
Maximum number of gradient-descent iterations.
Global stiffness constant \(K\).
Small positive floor used in
k_ij = K / max(g_ij, distance_floor)^2.
Small positive stabilizer added inside each embedded edge length.
Initial line-search step size.
Multiplicative shrink factor in `(0, 1)` for backtracking.
Non-negative Armijo decrease constant.
Non-negative stopping tolerance on the gradient norm.
Positive minimum accepted line-search step before giving up.
If TRUE, recenter the layout to zero mean after each
accepted step.
If TRUE, include per-iteration diagnostics and the
accepted intermediate coordinate frames.
The implementation fits the LGKK target scale L0 once from the
starting layout and then optimizes against those fixed target path lengths.
That keeps the gradient simple and makes the resulting line search robust for
an initial implementation.