mod features¶
- module features¶
Box geometry features and compensated ΔE. Measurable problem geometry and compensated energy differences.
Feature extraction for auto-routing (anneal regimes) and numerically safer ΔE on the acceptance path.
Functions
- fn box_geometry<T: Float>(bounds: &Bounds<T>) -> BoxGeometry¶
Extract geometry from bounds. Safe default for empty/invalid boxes.
- fn compensated_delta(f_new: f64, f_cur: f64) -> f64¶
Compensated energy difference
f_new - f_curfor acceptance channels.Uses a two-sum style compensation when both values are finite so that cancellation near equal energies is less biased than a bare subtraction. Falls back to ordinary subtraction if either argument is non-finite.
- fn isotropic_proposal_scale(geom: &BoxGeometry, c: f64) -> f64¶
Dimension-aware isotropic proposal scale:
c * mean_width / sqrt(dim).Matches the paper’s dimension-aware Move scale (prevents √D acceptance collapse).
Structs and Unions
- struct BoxGeometry¶
Box geometry features used by regime selection.
- dim: usize¶
Dimension of the box.
- mean_width: f64¶
Mean side length.
- aspect_ratio: f64¶
max_j width_j / min_j width_j (≥ 1). Infinite sides contribute a large aspect.
- widths: Vec<f64>¶
Per-coordinate widths (finite; non-positive replaced by 1).