Compose

Struct Compose 

Source
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: T1

The first transform in the composition.

§t2: T2

The second transform in the composition.

Trait Implementations§

Source§

impl<T1: Clone, T2: Clone> Clone for Compose<T1, T2>

Source§

fn clone(&self) -> Compose<T1, T2>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T1, T2> Transform for Compose<T1, T2>
where T1: Transform + Clone, T2: Transform + Clone,

Source§

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>>

Map from external to internal coordinates.
Source§

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>

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>

The Jacobian of the map from external to internal coordinates.
Source§

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>

Map from internal to external coordinates, returning an owned vector.
Source§

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>

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>

The Hessian on the internal space given an internal coordinate z, the external gradient g_ext, and the external Hessian h_ext.
Source§

fn pushforward_gradient( &self, z: &DVector<Float>, g_int: &DVector<Float>, ) -> DVector<Float>

The gradient on the external space given an internal coordinate z and the internal gradient g_int.
Source§

fn pushforward_hessian( &self, z: &DVector<Float>, g_int: &DVector<Float>, h_int: &DMatrix<Float>, ) -> DMatrix<Float>

The Hessian on the external space given an internal coordinate z, the internal gradient g_int, and the internal Hessian h_int.

Auto Trait Implementations§

§

impl<T1, T2> Freeze for Compose<T1, T2>
where T1: Freeze, T2: Freeze,

§

impl<T1, T2> RefUnwindSafe for Compose<T1, T2>

§

impl<T1, T2> Send for Compose<T1, T2>
where T1: Send, T2: Send,

§

impl<T1, T2> Sync for Compose<T1, T2>
where T1: Sync, T2: Sync,

§

impl<T1, T2> Unpin for Compose<T1, T2>
where T1: Unpin, T2: Unpin,

§

impl<T1, T2> UnwindSafe for Compose<T1, T2>
where T1: UnwindSafe, T2: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TransformExt for T

Source§

fn compose<T2>(self, t2: T2) -> Compose<Self, T2>

Compose a transform with another. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.