pub struct Compose<T1, T2> {
pub t1: T1,
pub t2: T2,
}Expand description
A struct represengint the composition of two transforms.
Specifically, this struct is designed such that t1.compose(t2) will
yield the mapping t2.to_external(t1.to_external(z)), so this composition starts with internal
coordinates, conducts the t1 transform, and then conducts the t2 transform.
Fields§
§t1: T1The first transform in the composition.
t2: T2The second transform in the composition.
Trait Implementations§
Source§impl<T1, T2> Transform for Compose<T1, T2>
impl<T1, T2> Transform for Compose<T1, T2>
Source§fn to_external<'a>(&'a self, z: &'a DVector<Float>) -> Cow<'a, DVector<Float>>
fn to_external<'a>(&'a self, z: &'a DVector<Float>) -> Cow<'a, DVector<Float>>
Map from internal to external coordinates.
Source§fn to_internal<'a>(&'a self, x: &'a DVector<Float>) -> Cow<'a, DVector<Float>>
fn to_internal<'a>(&'a self, x: &'a DVector<Float>) -> Cow<'a, DVector<Float>>
Map from external to internal coordinates.
Source§fn to_external_jacobian(&self, z: &DVector<Float>) -> DMatrix<Float>
fn to_external_jacobian(&self, z: &DVector<Float>) -> DMatrix<Float>
The Jacobian of the map from internal to external coordinates.
Source§fn to_external_component_hessian(
&self,
a: usize,
z: &DVector<Float>,
) -> DMatrix<Float>
fn to_external_component_hessian( &self, a: usize, z: &DVector<Float>, ) -> DMatrix<Float>
The Hessian of the map from internal to external coordinates for the
ath coordinate.Source§fn to_internal_jacobian(&self, x: &DVector<Float>) -> DMatrix<Float>
fn to_internal_jacobian(&self, x: &DVector<Float>) -> DMatrix<Float>
The Jacobian of the map from external to internal coordinates.
Source§fn to_internal_component_hessian(
&self,
b: usize,
x: &DVector<Float>,
) -> DMatrix<Float>
fn to_internal_component_hessian( &self, b: usize, x: &DVector<Float>, ) -> DMatrix<Float>
The Hessian of the map from external to internal coordinates for the
bth coordinate.Source§fn to_owned_external(&self, z: &DVector<Float>) -> DVector<Float>
fn to_owned_external(&self, z: &DVector<Float>) -> DVector<Float>
Map from internal to external coordinates, returning an owned vector.
Source§fn to_owned_internal(&self, x: &DVector<Float>) -> DVector<Float>
fn to_owned_internal(&self, x: &DVector<Float>) -> DVector<Float>
Map from external to internal coordinates, returning an owned vector.
Source§fn pullback_gradient(
&self,
z: &DVector<Float>,
g_ext: &DVector<Float>,
) -> DVector<Float>
fn pullback_gradient( &self, z: &DVector<Float>, g_ext: &DVector<Float>, ) -> DVector<Float>
The gradient on the internal space given an internal coordinate
z and the external
gradient g_ext.Source§fn pullback_hessian(
&self,
z: &DVector<Float>,
g_ext: &DVector<Float>,
h_ext: &DMatrix<Float>,
) -> DMatrix<Float>
fn pullback_hessian( &self, z: &DVector<Float>, g_ext: &DVector<Float>, h_ext: &DMatrix<Float>, ) -> DMatrix<Float>
The Hessian on the internal space given an internal coordinate
z, the external
gradient g_ext, and the external Hessian h_ext.Auto Trait Implementations§
impl<T1, T2> Freeze for Compose<T1, T2>
impl<T1, T2> RefUnwindSafe for Compose<T1, T2>where
T1: RefUnwindSafe,
T2: RefUnwindSafe,
impl<T1, T2> Send for Compose<T1, T2>
impl<T1, T2> Sync for Compose<T1, T2>
impl<T1, T2> Unpin for Compose<T1, T2>
impl<T1, T2> UnwindSafe for Compose<T1, T2>where
T1: UnwindSafe,
T2: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.