pub struct PreparedNormalization { /* private fields */ }Expand description
Prepared sufficient statistics and their parameter-only contraction.
Implementations§
Source§impl PreparedNormalization
impl PreparedNormalization
Sourcepub fn prepare(
model: &CompiledModel,
general_plan: &PreparedModel,
dataset: &Dataset,
execution: &Execution,
) -> RuntimeResult<Option<Arc<Self>>>
pub fn prepare( model: &CompiledModel, general_plan: &PreparedModel, dataset: &Dataset, execution: &Execution, ) -> RuntimeResult<Option<Arc<Self>>>
Prepares compiler-native normalization when selected by execution policy.
§Errors
Returns a runtime error when basis compilation, dataset traversal, memory reservation, or backend preparation fails.
Sourcepub fn stats(&self) -> &PreparedDatasetStats
pub fn stats(&self) -> &PreparedDatasetStats
Returns accepted-dataset statistics collected during preparation.
Sourcepub fn diagnostics(&self) -> PreparedNormalizationDiagnostics
pub fn diagnostics(&self) -> PreparedNormalizationDiagnostics
Returns normalization preparation diagnostics.
Sourcepub fn resident_bytes(&self) -> usize
pub fn resident_bytes(&self) -> usize
Returns retained sufficient-statistic storage in bytes.
Sourcepub fn value(
&self,
params: &ParamValues,
execution: &Execution,
) -> RuntimeResult<f64>
pub fn value( &self, params: &ParamValues, execution: &Execution, ) -> RuntimeResult<f64>
Evaluates the accepted normalization without constructing a gradient.
§Errors
Returns a runtime error for incompatible parameters, residual backend failures, or a verification mismatch.
Sourcepub fn value_gradient(
&self,
params: &ParamValues,
execution: &Execution,
) -> RuntimeResult<(f64, Vec<f64>)>
pub fn value_gradient( &self, params: &ParamValues, execution: &Execution, ) -> RuntimeResult<(f64, Vec<f64>)>
Evaluates the accepted normalization and its local free-parameter gradient.
§Errors
Returns a runtime error for incompatible parameters, autodiff/backend failures, or a verification mismatch.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PreparedNormalization
impl !RefUnwindSafe for PreparedNormalization
impl !UnwindSafe for PreparedNormalization
impl Send for PreparedNormalization
impl Sync for PreparedNormalization
impl Unpin for PreparedNormalization
impl UnsafeUnpin for PreparedNormalization
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> 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.