Derivative

Struct Derivative 

Source
pub struct Derivative<T: DualNum<F>, F, R: Dim, C: Dim>(/* private fields */)
where
    DefaultAllocator: Allocator<R, C>;
Expand description

Wrapper struct for a derivative vector or matrix.

Implementations§

Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Derivative<T, F, R, C>

Source

pub fn new(derivative: Option<OMatrix<T, R, C>>) -> Self

Source

pub fn some(derivative: OMatrix<T, R, C>) -> Self

Source

pub fn none() -> Self

Source

pub fn derivative_generic(r: R, c: C, i: usize) -> Self

Source

pub fn unwrap_generic(self, r: R, c: C) -> OMatrix<T, R, C>

Source

pub fn fmt(&self, f: &mut Formatter<'_>, symbol: &str) -> Result

Source§

impl<T: DualNum<F>, F> Derivative<T, F, U1, U1>

Source

pub fn derivative() -> Self

Source

pub fn unwrap(self) -> T

Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Derivative<T, F, R, C>

Source

pub fn tr_mul<R2: Dim, C2: Dim>( &self, rhs: &Derivative<T, F, R2, C2>, ) -> Derivative<T, F, C, C2>

Trait Implementations§

Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Add<&Derivative<T, F, R, C>> for Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Derivative<T, F, R, C>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Add for &Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Add for Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> AddAssign for Derivative<T, F, R, C>

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T: Clone + DualNum<F>, F: Clone, R: Clone + Dim, C: Clone + Dim> Clone for Derivative<T, F, R, C>

Source§

fn clone(&self) -> Derivative<T, F, R, C>

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<T: Debug + DualNum<F>, F: Debug, R: Debug + Dim, C: Debug + Dim> Debug for Derivative<T, F, R, C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for &Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> DivAssign<T> for Derivative<T, F, R, C>

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim, R2: Dim, C2: Dim> Mul<&Derivative<T, F, R2, C2>> for &Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C2>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Derivative<T, F, R2, C2>) -> Derivative<T, F, R, C2>

Performs the * operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for &Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> MulAssign<T> for Derivative<T, F, R, C>

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Neg for &Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Neg for Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: PartialEq + DualNum<F>, F: PartialEq, R: PartialEq + Dim, C: PartialEq + Dim> PartialEq for Derivative<T, F, R, C>

Source§

fn eq(&self, other: &Derivative<T, F, R, C>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, R: Dim, C: Dim> SimdValue for Derivative<T, T::Element, R, C>

Source§

const LANES: usize = T::LANES

The number of lanes of this SIMD value.
Source§

type Element = Derivative<<T as SimdValue>::Element, <T as SimdValue>::Element, R, C>

The type of the elements of each lane of this SIMD value.
Source§

type SimdBool = <T as SimdValue>::SimdBool

Type of the result of comparing two SIMD values like self.
Source§

fn splat(val: Self::Element) -> Self

Initializes an SIMD value with each lanes set to val.
Source§

fn extract(&self, i: usize) -> Self::Element

Extracts the i-th lane of self. Read more
Source§

unsafe fn extract_unchecked(&self, i: usize) -> Self::Element

Extracts the i-th lane of self without bound-checking. Read more
Source§

fn replace(&mut self, i: usize, val: Self::Element)

Replaces the i-th lane of self by val. Read more
Source§

unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)

Replaces the i-th lane of self by val without bound-checking. Read more
Source§

fn select(self, cond: Self::SimdBool, other: Self) -> Self

Merges self and other depending on the lanes of cond. Read more
Source§

fn map_lanes(self, f: impl Fn(Self::Element) -> Self::Element) -> Self
where Self: Clone,

Applies a function to each lane of self. Read more
Source§

fn zip_map_lanes( self, b: Self, f: impl Fn(Self::Element, Self::Element) -> Self::Element, ) -> Self
where Self: Clone,

Applies a function to each lane of self paired with the corresponding lane of b. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Sub<&Derivative<T, F, R, C>> for Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Derivative<T, F, R, C>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Sub for &Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> Sub for Derivative<T, F, R, C>

Source§

type Output = Derivative<T, F, R, C>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> SubAssign for Derivative<T, F, R, C>

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<TSuper, FSuper, T, F, R: Dim, C: Dim> SubsetOf<Derivative<TSuper, FSuper, R, C>> for Derivative<T, F, R, C>
where TSuper: DualNum<FSuper> + SupersetOf<T>, T: DualNum<F>, DefaultAllocator: Allocator<R, C>,

Source§

fn to_superset(&self) -> Derivative<TSuper, FSuper, R, C>

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

fn from_superset(element: &Derivative<TSuper, FSuper, R, C>) -> Option<Self>

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

fn from_superset_unchecked(element: &Derivative<TSuper, FSuper, R, C>) -> Self

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

fn is_in_subset(element: &Derivative<TSuper, FSuper, R, C>) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
Source§

impl<T: DualNum<F> + Copy, F: Copy, const R: usize, const C: usize> Copy for Derivative<T, F, Const<R>, Const<C>>

Source§

impl<T: Eq + DualNum<F>, F: Eq, R: Eq + Dim, C: Eq + Dim> Eq for Derivative<T, F, R, C>

Source§

impl<T: DualNum<F>, F, R: Dim, C: Dim> StructuralPartialEq for Derivative<T, F, R, C>

Auto Trait Implementations§

§

impl<T, F, R, C> !Freeze for Derivative<T, F, R, C>

§

impl<T, F, R, C> !RefUnwindSafe for Derivative<T, F, R, C>

§

impl<T, F, R, C> !Send for Derivative<T, F, R, C>

§

impl<T, F, R, C> !Sync for Derivative<T, F, R, C>

§

impl<T, F, R, C> !Unpin for Derivative<T, F, R, C>

§

impl<T, F, R, C> !UnwindSafe for Derivative<T, F, R, C>

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> 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, 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.
Source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

Source§

impl<T, Right> ClosedAddAssign<Right> for T
where T: ClosedAdd<Right> + AddAssign<Right>,

Source§

impl<T, Right> ClosedDiv<Right> for T
where T: Div<Right, Output = T> + DivAssign<Right>,

Source§

impl<T, Right> ClosedDivAssign<Right> for T
where T: ClosedDiv<Right> + DivAssign<Right>,

Source§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + MulAssign<Right>,

Source§

impl<T, Right> ClosedMulAssign<Right> for T
where T: ClosedMul<Right> + MulAssign<Right>,

Source§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

Source§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

Source§

impl<T, Right> ClosedSubAssign<Right> for T
where T: ClosedSub<Right> + SubAssign<Right>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,