Struct num_dual::Derivative
source · pub struct Derivative<T: DualNum<F>, F, R: Dim, C: Dim>(_, _)
where
DefaultAllocator: Allocator<T, 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>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
pub fn new(derivative: Option<OMatrix<T, R, C>>) -> Self
pub fn some(derivative: OMatrix<T, R, C>) -> Self
pub fn none() -> Self
pub fn derivative_generic(r: R, c: C, i: usize) -> Self
pub fn unwrap_generic(self, r: R, c: C) -> OMatrix<T, R, C>
pub fn fmt(&self, f: &mut Formatter<'_>, symbol: &str) -> Result
source§impl<T: DualNum<F>, F> Derivative<T, F, U1, U1>
impl<T: DualNum<F>, F> Derivative<T, F, U1, U1>
pub fn derivative() -> Self
pub fn unwrap(self) -> T
source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
pub fn tr_mul<R2: Dim, C2: Dim>( &self, rhs: &Derivative<T, F, R2, C2> ) -> Derivative<T, F, C, C2>where DefaultAllocator: Allocator<T, R2, C2> + Allocator<T, C, C2>, ShapeConstraint: SameNumberOfRows<R, R2>,
Trait Implementations§
source§impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Add<&'a Derivative<T, F, R, C>> for &'a Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Add<&'a Derivative<T, F, R, C>> for &'a Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Add<&'a Derivative<T, F, R, C>> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Add<&'a Derivative<T, F, R, C>> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
§type Output = Derivative<T, F, R, C>
type Output = Derivative<T, F, R, C>
The resulting type after applying the
+ operator.source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Add<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Add<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<T: DualNum<F>, F, R: Dim, C: Dim> AddAssign<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> AddAssign<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moresource§impl<T: Clone + DualNum<F>, F: Clone, R: Clone + Dim, C: Clone + Dim> Clone for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: Clone + DualNum<F>, F: Clone, R: Clone + Dim, C: Clone + Dim> Clone for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§fn clone(&self) -> Derivative<T, F, R, C>
fn clone(&self) -> Derivative<T, F, R, C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T: Debug + DualNum<F>, F: Debug, R: Debug + Dim, C: Debug + Dim> Debug for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: Debug + DualNum<F>, F: Debug, R: Debug + Dim, C: Debug + Dim> Debug for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for &'a Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for &'a Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<T: DualNum<F>, F, R: Dim, C: Dim> DivAssign<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> DivAssign<T> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the
/= operation. Read moresource§impl<'a, 'b, T: DualNum<F>, F, R: Dim, C: Dim, R2: Dim, C2: Dim> Mul<&'b Derivative<T, F, R2, C2>> for &'a Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C> + Allocator<T, R2, C2> + Allocator<T, R, C2>,
ShapeConstraint: SameNumberOfRows<C, R2>,
impl<'a, 'b, T: DualNum<F>, F, R: Dim, C: Dim, R2: Dim, C2: Dim> Mul<&'b Derivative<T, F, R2, C2>> for &'a Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C> + Allocator<T, R2, C2> + Allocator<T, R, C2>, ShapeConstraint: SameNumberOfRows<C, R2>,
§type Output = Derivative<T, F, R, C2>
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>
fn mul(self, rhs: &Derivative<T, F, R2, C2>) -> Derivative<T, F, R, C2>
Performs the
* operation. Read moresource§impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for &'a Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for &'a Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<T: DualNum<F>, F, R: Dim, C: Dim> MulAssign<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> MulAssign<T> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*= operation. Read moresource§impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Neg for &'a Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Neg for &'a Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Neg for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Neg for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<T: PartialEq + DualNum<F>, F: PartialEq, R: PartialEq + Dim, C: PartialEq + Dim> PartialEq<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: PartialEq + DualNum<F>, F: PartialEq, R: PartialEq + Dim, C: PartialEq + Dim> PartialEq<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§fn eq(&self, other: &Derivative<T, F, R, C>) -> bool
fn eq(&self, other: &Derivative<T, F, R, C>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<T, R: Dim, C: Dim> SimdValue for Derivative<T, T::Element, R, C>where
DefaultAllocator: Allocator<T, R, C> + Allocator<T::Element, R, C>,
T: DualNum<T::Element> + SimdValue + Scalar,
T::Element: DualNum<T::Element> + Scalar + Zero,
impl<T, R: Dim, C: Dim> SimdValue for Derivative<T, T::Element, R, C>where DefaultAllocator: Allocator<T, R, C> + Allocator<T::Element, R, C>, T: DualNum<T::Element> + SimdValue + Scalar, T::Element: DualNum<T::Element> + Scalar + Zero,
§type Element = Derivative<<T as SimdValue>::Element, <T as SimdValue>::Element, R, C>
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.
§type SimdBool = <T as SimdValue>::SimdBool
type SimdBool = <T as SimdValue>::SimdBool
Type of the result of comparing two SIMD values like
self.source§unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
Extracts the i-th lane of
self without bound-checking.source§unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)
unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)
Replaces the i-th lane of
self by val without bound-checking.source§impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Sub<&'a Derivative<T, F, R, C>> for &'a Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Sub<&'a Derivative<T, F, R, C>> for &'a Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Sub<&'a Derivative<T, F, R, C>> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<'a, T: DualNum<F>, F, R: Dim, C: Dim> Sub<&'a Derivative<T, F, R, C>> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
§type Output = Derivative<T, F, R, C>
type Output = Derivative<T, F, R, C>
The resulting type after applying the
- operator.source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Sub<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Sub<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§impl<T: DualNum<F>, F, R: Dim, C: Dim> SubAssign<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> SubAssign<Derivative<T, F, R, C>> for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moresource§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<T, R, C> + Allocator<TSuper, R, C>,
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<T, R, C> + Allocator<TSuper, R, C>,
source§fn to_superset(&self) -> Derivative<TSuper, FSuper, R, C>
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>
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 moresource§fn from_superset_unchecked(element: &Derivative<TSuper, FSuper, R, C>) -> Self
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
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).impl<T: DualNum<F> + Copy, F: Copy, const R: usize, const C: usize> Copy for Derivative<T, F, Const<R>, Const<C>>
impl<T: Eq + DualNum<F>, F: Eq, R: Eq + Dim, C: Eq + Dim> Eq for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> StructuralEq for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> StructuralPartialEq for Derivative<T, F, R, C>where DefaultAllocator: Allocator<T, R, C>,
Auto Trait Implementations§
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> 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<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.