pub struct SeparableCellMeasure<'a> {
pub structural: StructuralCells<'a>,
pub likelihood_weights: LikelihoodWeights<'a>,
}Expand description
Structural activity plus numerical likelihood weights for a separable response. An inactive cell has no likelihood contribution; an active cell with weight zero remains an observed member of the response geometry.
Fields§
§structural: StructuralCells<'a>Which response cells exist in the likelihood.
likelihood_weights: LikelihoodWeights<'a>Numerical measure applied to existing cells.
Implementations§
Source§impl<'a> SeparableCellMeasure<'a>
impl<'a> SeparableCellMeasure<'a>
Sourcepub const fn row_weighted(weights: ArrayView1<'a, f64>) -> Self
pub const fn row_weighted(weights: ArrayView1<'a, f64>) -> Self
All cells present with a shared weight per row.
Sourcepub const fn new(
structural: StructuralCells<'a>,
likelihood_weights: LikelihoodWeights<'a>,
) -> Self
pub const fn new( structural: StructuralCells<'a>, likelihood_weights: LikelihoodWeights<'a>, ) -> Self
Construct from an explicit structural layout and numerical measure.
Sourcepub fn validate(
&self,
n_rows: usize,
n_outputs: usize,
) -> Result<(), IndexedResponseError>
pub fn validate( &self, n_rows: usize, n_outputs: usize, ) -> Result<(), IndexedResponseError>
Validate every shape, weight, and sparse-set index against (N, M).
Sourcepub fn is_active(&self, row: usize, output: usize) -> bool
pub fn is_active(&self, row: usize, output: usize) -> bool
Whether (row, output) is structurally present.
Sourcepub fn active_weight(&self, row: usize, output: usize) -> Option<f64>
pub fn active_weight(&self, row: usize, output: usize) -> Option<f64>
Numerical weight of an active cell, or None when the cell is
structurally absent. Returning Some(0.0) preserves the distinction
between a present zero-weight observation and an absent cell.
Sourcepub fn to_owned(
&self,
n_rows: usize,
n_outputs: usize,
) -> Result<OwnedSeparableCellMeasure, IndexedResponseError>
pub fn to_owned( &self, n_rows: usize, n_outputs: usize, ) -> Result<OwnedSeparableCellMeasure, IndexedResponseError>
Copy this borrowed view into a lifetime-free measure while preserving sparse structural representations.
Trait Implementations§
Source§impl<'a> Clone for SeparableCellMeasure<'a>
impl<'a> Clone for SeparableCellMeasure<'a>
Source§fn clone(&self) -> SeparableCellMeasure<'a>
fn clone(&self) -> SeparableCellMeasure<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for SeparableCellMeasure<'a>
Auto Trait Implementations§
impl<'a> Freeze for SeparableCellMeasure<'a>
impl<'a> RefUnwindSafe for SeparableCellMeasure<'a>
impl<'a> Send for SeparableCellMeasure<'a>
impl<'a> Sync for SeparableCellMeasure<'a>
impl<'a> Unpin for SeparableCellMeasure<'a>
impl<'a> UnsafeUnpin for SeparableCellMeasure<'a>
impl<'a> UnwindSafe for SeparableCellMeasure<'a>
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.