pub struct Selection {
pub hits: Vec<u64>,
pub effective_lambda: Vec<f64>,
pub sample_size: u64,
pub eps_sum: f64,
pub corrected_unit: Option<usize>,
pub adjusted_crossings: usize,
pub max_adjustment: f64,
}Expand description
The outcome of a pmr selection.
Fields§
§hits: Vec<u64>Realised hits per unit, in list order. Always the floor or the ceiling of the unit’s effective expected hits, and summing exactly to the sample size.
effective_lambda: Vec<f64>The expected hits the selection actually used, after the floating-point drift was assigned. These are the denominators of the sampling weights.
sample_size: u64The integer sample size the expected hits summed to.
eps_sum: f64The floating-point drift between the sum of expected hits and the sample size, before it was assigned.
corrected_unit: Option<usize>The unit (list position) that absorbed the drift, if any was needed.
adjusted_crossings: usizeHow many crossings sat within [TAU] of an integer boundary and
were settled by borrowing from the units that follow.
max_adjustment: f64The largest absolute difference between a unit’s effective and nominal expected hits.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Selection
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnsafeUnpin for Selection
impl UnwindSafe for Selection
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