Skip to contents

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.

Usage

prepare.landmark.geodesic.kk(
  edges = NULL,
  n = NULL,
  adj_list = NULL,
  weight_list = NULL,
  edge_weights = NULL,
  local_nbrs = 20L,
  landmark_count = 8L
)

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.

Value

A list with the sparse pair set, graph distances, chosen paths, and other cached data. The object has class "grip_lgkk_prepared".

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.