pub struct WeightedPickState {
pub table: AliasTableU64,
pub values: Vec<u64>,
pub weights: Vec<f64>,
}Expand description
Derived state for WeightedPick: parsed values, weights, and the
alias table, built once at construction from the spec string and
read on every cycle (both in the eval path and the compiled
closure). weights is retained alongside values so
FusedNode::decomposed can reconstruct the equivalent
weighted_u64 spec string.
Fields§
§table: AliasTableU64The alias table sampled.
values: Vec<u64>The value per outcome.
weights: Vec<f64>The weight per outcome, kept to reconstruct the spec.
Trait Implementations§
impl PolydatSetup for WeightedPickState
Auto Trait Implementations§
impl Freeze for WeightedPickState
impl RefUnwindSafe for WeightedPickState
impl Send for WeightedPickState
impl Sync for WeightedPickState
impl Unpin for WeightedPickState
impl UnsafeUnpin for WeightedPickState
impl UnwindSafe for WeightedPickState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more