`edge.repulsive.state()` evaluates an experimental GMDS objective that combines an edge-isometric term with a configurable repulsion term. The edge term penalizes deviation of embedded edge lengths from graph edge lengths. The repulsion term can be evaluated on all vertex pairs or on a selected pair set.
edge.repulsive.state(
coords,
edges,
edge.lengths,
edge.weights = NULL,
edge.family = c("quadratic", "upper_barrier"),
eps.plus = 0.35,
beta = 0,
lambda = 0,
pair.index = NULL,
pair.weights = NULL,
repulsion.family = c("log", "inverse_power"),
repulsion.delta = 0.001,
repulsion.power = 1,
distance.eps = 1e-10,
engine = c("cpp", "R")
)A list containing total energy, edge and repulsion energies, gradient, gradient norm, feasibility flag, embedded edge lengths, relative edge lengths, edge residuals, and number of upper-barrier wall violations.
Numeric `n` by `dim` coordinate matrix.
Integer or numeric matrix with two columns containing 1-based graph edge endpoints.
Numeric vector of target edge lengths, parallel to `edges`.
Optional non-negative edge weights. Defaults to one.
Edge potential family, either `"quadratic"` or `"upper_barrier"`.
Upper-barrier slack parameter.
Upper-barrier strength. When `beta <= 0`, the edge potential is quadratic.
Repulsion strength.
Optional two-column matrix of 1-based vertex pairs for the repulsion term. If `NULL` and `lambda > 0`, all unordered pairs are used.
Optional pair weights, parallel to `pair.index`.
Repulsion potential family, either `"log"` or `"inverse_power"`.
Small positive softening parameter for pair distances.
Power used by the `"inverse_power"` repulsion.
Small positive distance floor used in derivatives.
Backend engine. `"cpp"` is the default; `"R"` uses the reference implementation.
The default `engine = "cpp"` uses the compiled backend. `engine = "R"` keeps a reference implementation available for diagnostics and regression tests.