mod basin¶
- module basin¶
Capacity-limited catalog of validated descriptor-basin representatives.
Enums
- enum AdmissionOutcome¶
Deterministic result of one serialized catalog admission.
- Added¶
Candidate filled an available active slot.
- basin_id: BasinId¶
Census basin linked to the new entry.
- ReplacedSameBasin¶
Candidate improved the representative for its census basin.
- basin_id: BasinId¶
Census basin linked to the replacement.
- ReplacedConflicts¶
Candidate replaced every entry in its packing conflict set.
- basin_id: BasinId¶
Census basin linked to the replacement.
- evicted: Vec<BasinId>¶
Evicted census basins in stable active-entry order.
- ReplacedCapacity¶
A conflict-free candidate replaced the worst nonincumbent at capacity.
- basin_id: BasinId¶
Census basin linked to the replacement.
- evicted: BasinId¶
Evicted census basin.
- Rejected¶
Candidate left the active catalog unchanged.
- reason: AdmissionRejection¶
Classified rejection reason.
- enum AdmissionRejection¶
Reason an otherwise validated candidate did not enter the active catalog.
- SameBasinNotLower¶
The active representative for this census basin has lower or equal energy.
- ConflictNotLower¶
At least one geometrically conflicting representative has lower or equal energy.
- CapacityNotLower¶
The candidate cannot improve the replaceable entry at capacity.
- enum BasinCatalogError¶
Invalid active-catalog configuration.
- ZeroCapacity¶
At least one active representative must be allowed.
- InvalidCensusRadius¶
Census radius must be finite and nonnegative.
- ZeroChargedWorkBudget¶
Aggregate charged-work budget must be positive.
Structs and Unions
- struct ActiveBasinEntry¶
Active representative retaining validated coordinates and provenance.
Implementations
- impl ActiveBasinEntry¶
Functions
- fn census_id(&self) -> BasinId¶
Stable identifier in the uncapped census.
- fn census_visits_at_admission(&self) -> u64¶
Exact census count recorded when this representative entered.
- fn coordinates(&self) -> &[f64]¶
Coordinates carried by the validated candidate.
- fn descriptor(&self) -> &[f64]¶
Descriptor carried by the validated candidate.
- fn energy(&self) -> f64¶
Receiving-side validated energy used for catalog comparisons.
- fn event_sequence(&self) -> u64¶
Producer event sequence retained for provenance.
- fn producer_replica(&self) -> u32¶
Replica that produced the representative.
- fn validated(&self) -> &ValidatedCandidate¶
Full validation evidence retained by the catalog.
- struct BasinCatalog¶
Finite active catalog with separated representatives and a monotone incumbent.
Implementations
- impl BasinCatalog¶
Functions
- fn admit(&mut self, basin_id: BasinId, census_visits: u64, validated: ValidatedCandidate) -> AdmissionOutcome¶
Apply one serialized admission decision.
- fn capacity(&self) -> usize¶
Maximum number of active basin representatives.
- fn entries(&self) -> &[ActiveBasinEntry]¶
Active entries in deterministic storage order.
- fn entry(&self, basin_id: BasinId) -> Option<&ActiveBasinEntry>¶
Look up an active entry through its uncapped census identity.
- fn incumbent(&self) -> Option<&ActiveBasinEntry>¶
Lowest-energy active representative.
- fn initial_threshold(&self) -> Option<f64>¶
Packing-safe initial threshold derived from the initial population.
- fn is_empty(&self) -> bool¶
Whether the active catalog contains no representatives.
- fn len(&self) -> usize¶
Number of active basin representatives.
- fn new(capacity: usize, census_radius: f64, total_charged_work: u64) -> Result<Self, BasinCatalogError>¶
Create an empty active catalog and its aggregate-work threshold schedule.
- fn packing_threshold(&self) -> Option<f64>¶
Current nonincreasing packing threshold.
- fn raw_initial_scale(&self) -> Option<f64>¶
Half-mean pair-distance scale measured from the initial population.
- fn update_threshold(&mut self, charged_work: u64) -> Option<f64>¶
Lower the packing threshold according to aggregate charged work.
- fn version(&self) -> u64¶
Monotone catalog version incremented by active-state mutations.
- fn with_capacity(capacity: usize) -> Self¶
Compatibility constructor for an empty catalog without a work schedule.