Struct RungTable
pub struct RungTable {
pub rungs: Vec<RungOccupancy>,
}Expand description
The typed, serializable snapshot of a whole ladder’s occupancy.
This is the shape the design mandates for rung state:
Scope::Scheduler data, not
attribute-string hacks. atune derives it
from the StudyView on demand (AshaPruner::rung_table)
rather than maintaining it as a mutable side-table, but the type exists so a
caller can persist or ship it — it round-trips through a
StateBlob unchanged.
Fields§
§rungs: Vec<RungOccupancy>One entry per gating rung, ascending by resource.
Implementations§
§impl RungTable
impl RungTable
pub fn build(
view: &StudyView,
ladder: &RungLadder,
obj: usize,
in_bracket: impl Fn(TrialNumber) -> bool,
) -> Self
pub fn build( view: &StudyView, ladder: &RungLadder, obj: usize, in_bracket: impl Fn(TrialNumber) -> bool, ) -> Self
Derives the whole ladder’s occupancy from the study snapshot.
in_bracket scopes it to one Hyperband bracket (pass |_| true for a
plain ladder). Purely a read of the typed history — the same recovery the
live promotion path does per rung, assembled across every rung for
observability, testing and (optional) persistence.