mod history

module history

Per-epoch run history returned by run_rs. Run history: per-epoch summary and full trajectory record returned by the run_rs driver loop.

Enums

enum AcceptKind

Whether the SA driver accepted or rejected the most recent proposal.

AcceptedDownhill

Downhill move (delta_e <= 0); accepted with probability 1 (L3).

AcceptedUphill

Uphill move accepted by the Boltzmann/Tsallis criterion.

Rejected

Uphill move rejected.

Structs and Unions

struct EpochLine

One row of the run history: summary statistics for an epoch.

epoch: usize

Zero-based epoch index.

temp: f64

Temperature at this epoch (the cooling-schedule output).

accepted: usize

Number of proposals accepted in this epoch.

rejected: usize

Number of proposals rejected in this epoch.

best_val: f64

Best objective value seen up to and including this epoch.

Implementations

impl EpochLine

Functions

fn accept_ratio(&self) -> f64

Acceptance ratio in this epoch (accepted / (accepted + rejected)), or 0 if the epoch had no proposals.

struct History

Run history returned by run_rs: per-epoch summary lines plus the best-seen (pos, val) pair across the full run.

epochs: Vec<EpochLine>

One EpochLine per epoch, in epoch order.

best: FPair<f64>

Best (position, value) pair seen across the entire run.

Implementations

impl History

Functions

fn total_accepted(&self) -> usize

Total proposals accepted across all epochs.

fn total_rejected(&self) -> usize

Total proposals rejected across all epochs.

fn with_capacity(n_epochs: usize, best: FPair<f64>) -> Self

Constructs an empty History with the given epoch capacity.

struct State

Internal driver state: current position and best-seen position.

cur: FPair<f64>

Current position and its objective value.

best: FPair<f64>

Best position seen so far and its objective value.