pub struct PreparedStructuralTofMultiBankObjective { /* private fields */ }Expand description
Prepared matrix-free structural TOF sum over all banks.
Implementations§
Source§impl PreparedStructuralTofMultiBankObjective
impl PreparedStructuralTofMultiBankObjective
Sourcepub fn new(
input: StructuralTofMultiBankInput,
) -> Result<Self, StructuralTofMultiBankError>
pub fn new( input: StructuralTofMultiBankInput, ) -> Result<Self, StructuralTofMultiBankError>
Prepare stable parameter mappings and bank-local background bases.
§Errors
Returns StructuralTofMultiBankError for invalid request state.
Sourcepub const fn input(&self) -> &StructuralTofMultiBankInput
pub const fn input(&self) -> &StructuralTofMultiBankInput
Borrow the complete prepared request.
Sourcepub const fn layout(&self) -> &StructuralTofMultiBankLayout
pub const fn layout(&self) -> &StructuralTofMultiBankLayout
Borrow the stable shared/local parameter layout.
Sourcepub fn calculate(
&self,
) -> Result<StructuralTofMultiBankCalculation, StructuralTofMultiBankError>
pub fn calculate( &self, ) -> Result<StructuralTofMultiBankCalculation, StructuralTofMultiBankError>
Calculate all banks and the summed objective.
§Errors
Returns StructuralTofMultiBankError for a numerical or residual failure.
Sourcepub fn jvp(
&self,
direction: &[f64],
) -> Result<Vec<StructuralTofMultiBankProduct>, StructuralTofMultiBankError>
pub fn jvp( &self, direction: &[f64], ) -> Result<Vec<StructuralTofMultiBankProduct>, StructuralTofMultiBankError>
Apply every bank Jacobian to one joint physical direction.
§Errors
Returns StructuralTofMultiBankError for an invalid direction or product.
Sourcepub fn vjp(
&self,
weights: &[Vec<f64>],
) -> Result<Vec<f64>, StructuralTofMultiBankError>
pub fn vjp( &self, weights: &[Vec<f64>], ) -> Result<Vec<f64>, StructuralTofMultiBankError>
Apply the transpose of all bank Jacobians and sum shared rows.
§Errors
Returns StructuralTofMultiBankError for bank/sample shape or product failures.
Sourcepub fn gradient(
&self,
) -> Result<StructuralTofMultiBankGradient, StructuralTofMultiBankError>
pub fn gradient( &self, ) -> Result<StructuralTofMultiBankGradient, StructuralTofMultiBankError>
Evaluate the accepted objective and its physical gradient.
§Errors
Returns StructuralTofMultiBankError for residual or reverse-product state.
Sourcepub fn normal_product(
&self,
direction: &[f64],
damping: f64,
) -> Result<Vec<f64>, StructuralTofMultiBankError>
pub fn normal_product( &self, direction: &[f64], damping: f64, ) -> Result<Vec<f64>, StructuralTofMultiBankError>
Apply J^T W J + damping I in joint physical coordinates.
§Errors
Returns StructuralTofMultiBankError for invalid damping or products.
Auto Trait Implementations§
impl !RefUnwindSafe for PreparedStructuralTofMultiBankObjective
impl !UnwindSafe for PreparedStructuralTofMultiBankObjective
impl Freeze for PreparedStructuralTofMultiBankObjective
impl Send for PreparedStructuralTofMultiBankObjective
impl Sync for PreparedStructuralTofMultiBankObjective
impl Unpin for PreparedStructuralTofMultiBankObjective
impl UnsafeUnpin for PreparedStructuralTofMultiBankObjective
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
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
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.