pub enum RowSet {
All,
Subsample {
rows: Arc<Vec<WeightedOuterRow>>,
n_full: usize,
},
}Expand description
Row selection for an outer-loop evaluation: either the full data (All) or
a Horvitz–Thompson WeightedOuterRow subsample.
All walks rows 0..n_total with unit weight; Subsample walks the stored
rows applying each row’s inverse-inclusion scale 1/π_i, so any partial sum
Σ_i w_i · f(row_i) is an unbiased estimator of the corresponding full-data
sum Σ_{i=1..n_full} f(row_i). Inner-PIRLS and final-covariance passes
always run with All; only outer score / gradient hot loops consume a
non-All variant.
Lives in this lower layer (below families/terms) so the row-kernel
consumers and the term hot-paths can name it without the Subsample field
reaching up into solver (#1135). The family-specific constructor
(families::row_kernel::RowSet::from_options, which reads
custom_family::BlockwiseFitOptions) stays in families as an extension
impl block.
Variants§
Implementations§
Source§impl RowSet
impl RowSet
Sourcepub fn par_reduce_fold<T, I, F, R>(
&self,
n_total: usize,
init: I,
fold: F,
reduce: R,
) -> T
pub fn par_reduce_fold<T, I, F, R>( &self, n_total: usize, init: I, fold: F, reduce: R, ) -> T
Parallel fold-reduce over the row set. init produces a fresh
accumulator, fold is the per-row update, reduce combines two
accumulators.
Returns the reduced result. Both branches process fixed-size row chunks in parallel, then combine the chunk accumulators in chunk-index order on the caller thread. The resulting floating-point reduction tree is fixed across Rayon worker counts and work-stealing decisions.
Sourcepub fn par_try_reduce_fold<T, E, I, F, R>(
&self,
n_total: usize,
init: I,
fold: F,
reduce: R,
) -> Result<T, E>
pub fn par_try_reduce_fold<T, E, I, F, R>( &self, n_total: usize, init: I, fold: F, reduce: R, ) -> Result<T, E>
Parallel try-fold over fixed-size row chunks, followed by deterministic chunk-index-order reduction on the caller thread.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RowSet
impl RefUnwindSafe for RowSet
impl Send for RowSet
impl Sync for RowSet
impl Unpin for RowSet
impl UnsafeUnpin for RowSet
impl UnwindSafe for RowSet
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.