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>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Derivative<T, F, R, C>where
DefaultAllocator: Allocator<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<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Derivative<T, F, R, C>where
DefaultAllocator: Allocator<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<R2, C2> + Allocator<C, C2>,
ShapeConstraint: SameNumberOfRows<R, R2>,
Trait Implementations§
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<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<R, C>,
Source§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 for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Add for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Add for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Add for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> AddAssign for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> AddAssign for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<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<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<R, C>,
Source§fn clone(&self) -> Derivative<T, F, R, C>
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)
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<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<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Div<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> DivAssign<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> DivAssign<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the
/=
operation. Read moreSource§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>where
DefaultAllocator: Allocator<R, C> + Allocator<R2, C2> + Allocator<R, C2>,
ShapeConstraint: SameNumberOfRows<C, R2>,
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>where
DefaultAllocator: Allocator<R, C> + Allocator<R2, C2> + Allocator<R, C2>,
ShapeConstraint: SameNumberOfRows<C, R2>,
Source§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<T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Mul<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> MulAssign<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> MulAssign<T> for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*=
operation. Read moreSource§impl<T: DualNum<F>, F, R: Dim, C: Dim> Neg for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Neg for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Neg for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Neg for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: PartialEq + DualNum<F>, F: PartialEq, R: PartialEq + Dim, C: PartialEq + Dim> PartialEq for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: PartialEq + DualNum<F>, F: PartialEq, R: PartialEq + Dim, C: PartialEq + Dim> PartialEq for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T, R: Dim, C: Dim> SimdValue for Derivative<T, T::Element, R, C>
impl<T, R: Dim, C: Dim> SimdValue for Derivative<T, T::Element, R, C>
Source§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.
Source§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. Read moreSource§unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)
unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)
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<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<R, C>,
Source§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 for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Sub for &Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> Sub for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> Sub for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
Source§impl<T: DualNum<F>, F, R: Dim, C: Dim> SubAssign for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> SubAssign for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<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>
impl<TSuper, FSuper, T, F, R: Dim, C: Dim> SubsetOf<Derivative<TSuper, FSuper, R, C>> for Derivative<T, F, 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<R, C>,
impl<T: DualNum<F>, F, R: Dim, C: Dim> StructuralPartialEq for Derivative<T, F, R, C>where
DefaultAllocator: Allocator<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> 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.