mod floors

module floors

Energy-floor flicker components and record EI. Energy floors and flicker components.

A class is a bundle of minima that share a floor and that the hop already treats as one place: union-find on accepted rises no larger than delta_e, and assignment of a new quench to the floor whose minimum sits within delta_e of it. That is the energy-class collapse that a global contact key cannot do.

Expected improvement of another draw from a class, under exchangeability: EI = ebar / (n + 1), with ebar the mean excess over the class minimum. A class that cannot beat E_star even by one excess has EI zero. Saturated when P(record) = 1/(n+1) is at most the cost-asymmetric tau or EI is zero.

Structs and Unions

struct Floor

One energy class.

e_min: f64

Lowest quenched energy in the class.

e_second: f64

Second-lowest, or e_min when n < 2.

n: usize

Members observed.

Implementations

impl Floor

Functions

fn can_beat(&self, e_star: f64) -> bool

Whether a record of typical size could undercut e_star.

fn ei(&self) -> f64

Non-parametric EI of another draw from this class.

fn mean_excess(&self) -> f64

Mean excess over the class minimum. Zero until a second member.

fn record_prob(&self) -> f64

Exchangeable record probability.

fn saturated(&self, tau: f64, e_star: f64) -> bool

Whether another full quench of this class fails the cost gate.

fn useful_ei(&self, e_star: f64) -> f64

EI that can change the reported answer.

struct FloorBook

Book of energy classes.

Implementations

impl FloorBook

Functions

fn assign(&mut self, e: f64, prev: Option<usize>, rise: f64) -> usize

Assign a quenched energy to a class, creating one if needed.

prev is the class the chain stood on. A rise no larger than delta_e stays in prev. Otherwise the nearest floor within delta_e in energy claims it.

fn best_start(&self, tau: f64, e_star: f64) -> Option<usize>

Index of the class with largest useful EI, if any is unsaturated.

fn delta_e(&self) -> f64

Quantile of accepted uphill rises. Zero before any rise is recorded.

fn get(&self, i: usize) -> Option<&Floor>

Floor i.

fn is_empty(&self) -> bool

Whether the book has no classes.

fn len(&self) -> usize

Number of classes.

fn new() -> Self

Empty book.

fn observe_rise(&mut self, rise: f64)

Record an accepted uphill rise (non-positive ignored).

fn tau(screen_steps: usize, relax_steps: usize) -> f64

Default cost-asymmetric tau from the hop’s step counts.