pub struct AdditiveWiggleBlockLayout<'a> {
pub family: &'a str,
pub n_outputs: usize,
pub additive_blocks: &'a [usize],
pub wiggle_block: Option<usize>,
}Expand description
Static description of an additive-plus-wiggle family’s block layout, used to
build the per-block BlockEffectiveJacobian in one place.
additive_blocks lists the block ids that contribute a linear additive term
to a single family output; each such block drives output block_idx
(i.e. own_output == block_idx). wiggle_block is the optional nonlinear
link-modulation block whose effective linear Jacobian is all zeros; its row
count is taken from the first additive block’s design.
Fields§
§family: &'a strFamily name used as the message prefix and effective_design context,
e.g. "SurvivalLocationScaleFamily".
n_outputs: usizeTotal number of stacked family outputs (e.g. 3 for survival location-scale, 2 for Binomial location-scale).
additive_blocks: &'a [usize]Block ids that contribute a linear additive term to their own output.
wiggle_block: Option<usize>Optional nonlinear link-modulation block id (all-zero linear Jacobian).
Implementations§
Source§impl AdditiveWiggleBlockLayout<'_>
impl AdditiveWiggleBlockLayout<'_>
Sourcepub fn block_effective_jacobian(
&self,
specs: &[ParameterBlockSpec],
block_idx: usize,
) -> Result<Box<dyn BlockEffectiveJacobian>, String>
pub fn block_effective_jacobian( &self, specs: &[ParameterBlockSpec], block_idx: usize, ) -> Result<Box<dyn BlockEffectiveJacobian>, String>
Build the BlockEffectiveJacobian for block_idx under this layout.
- An additive block returns an
AdditiveBlockJacobianover its effective design withown_output = block_idxandn_family_outputs = n_outputs. - The wiggle block returns an
AdditiveBlockJacobianover an(n × p_wiggle)zero design anchored atown_output = 0, withnread from the first additive block’s design.
Auto Trait Implementations§
impl<'a> Freeze for AdditiveWiggleBlockLayout<'a>
impl<'a> RefUnwindSafe for AdditiveWiggleBlockLayout<'a>
impl<'a> Send for AdditiveWiggleBlockLayout<'a>
impl<'a> Sync for AdditiveWiggleBlockLayout<'a>
impl<'a> Unpin for AdditiveWiggleBlockLayout<'a>
impl<'a> UnsafeUnpin for AdditiveWiggleBlockLayout<'a>
impl<'a> UnwindSafe for AdditiveWiggleBlockLayout<'a>
Blanket Implementations§
impl<T> Allocation for T
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> 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.