pub struct Dual2<T: DualNum<F>, F> {
pub re: T,
pub v1: T,
pub v2: T,
/* private fields */
}
Expand description
A scalar second order dual number for the calculation of second derivatives.
Fields§
§re: T
Real part of the second order dual number
v1: T
First derivative part of the second order dual number
v2: T
Second derivative part of the second order dual number
Implementations§
Source§impl<T: DualNum<F>, F> Dual2<T, F>
impl<T: DualNum<F>, F> Dual2<T, F>
Sourcepub fn derivative(self) -> Self
pub fn derivative(self) -> Self
Set the derivative part to 1.
let x = Dual2::from_re(5.0).derivative().powi(2);
assert_eq!(x.re, 25.0); // x²
assert_eq!(x.v1, 10.0); // 2x
assert_eq!(x.v2, 2.0); // 2
Can also be used for higher order derivatives.
let x = Dual2::from_re(Dual64::from_re(5.0).derivative())
.derivative()
.powi(2);
assert_eq!(x.re.re, 25.0); // x²
assert_eq!(x.re.eps, 10.0); // 2x
assert_eq!(x.v1.re, 10.0); // 2x
assert_eq!(x.v1.eps, 2.0); // 2
assert_eq!(x.v2.re, 2.0); // 2
Trait Implementations§
Source§impl<T: DualNum<F> + AbsDiffEq<Epsilon = T>, F: Float> AbsDiffEq for Dual2<T, F>
Like PartialEq, comparisons are only made based on the real part. This allows the code to follow the
same execution path as real-valued code would.
impl<T: DualNum<F> + AbsDiffEq<Epsilon = T>, F: Float> AbsDiffEq for Dual2<T, F>
Like PartialEq, comparisons are only made based on the real part. This allows the code to follow the same execution path as real-valued code would.
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq
.Source§impl<T: DualNum<F>, F> AddAssign<F> for Dual2<T, F>
impl<T: DualNum<F>, F> AddAssign<F> for Dual2<T, F>
Source§fn add_assign(&mut self, other: F)
fn add_assign(&mut self, other: F)
+=
operation. Read moreSource§impl<T: DualNum<F>, F> AddAssign for Dual2<T, F>
impl<T: DualNum<F>, F> AddAssign for Dual2<T, F>
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
+=
operation. Read moreSource§impl<T> ComplexField for Dual2<T, T::Element>where
T: DualNum<T::Element> + SupersetOf<T> + AbsDiffEq<Epsilon = T> + Sync + Send + SupersetOf<T::Element> + SupersetOf<f32> + SupersetOf<f64> + SimdPartialOrd + PartialOrd + SimdValue<Element = T, SimdBool = bool> + RelativeEq + UlpsEq + AbsDiffEq,
T::Element: DualNum<T::Element> + Scalar + DualNumFloat + Sync + Send,
impl<T> ComplexField for Dual2<T, T::Element>where
T: DualNum<T::Element> + SupersetOf<T> + AbsDiffEq<Epsilon = T> + Sync + Send + SupersetOf<T::Element> + SupersetOf<f32> + SupersetOf<f64> + SimdPartialOrd + PartialOrd + SimdValue<Element = T, SimdBool = bool> + RelativeEq + UlpsEq + AbsDiffEq,
T::Element: DualNum<T::Element> + Scalar + DualNumFloat + Sync + Send,
type RealField = Dual2<T, <T as SimdValue>::Element>
Source§fn from_real(re: Self::RealField) -> Self
fn from_real(re: Self::RealField) -> Self
Source§fn modulus_squared(self) -> Self::RealField
fn modulus_squared(self) -> Self::RealField
Source§fn norm1(self) -> Self::RealField
fn norm1(self) -> Self::RealField
fn floor(self) -> Self
fn ceil(self) -> Self
fn round(self) -> Self
fn trunc(self) -> Self
fn fract(self) -> Self
fn mul_add(self, a: Self, b: Self) -> Self
Source§fn abs(self) -> Self::RealField
fn abs(self) -> Self::RealField
self / self.signum()
. Read moreSource§fn hypot(self, other: Self) -> Self::RealField
fn hypot(self, other: Self) -> Self::RealField
fn recip(self) -> Self
fn conjugate(self) -> Self
fn sin(self) -> Self
fn cos(self) -> Self
fn sin_cos(self) -> (Self, Self)
fn tan(self) -> Self
fn asin(self) -> Self
fn acos(self) -> Self
fn atan(self) -> Self
fn sinh(self) -> Self
fn cosh(self) -> Self
fn tanh(self) -> Self
fn asinh(self) -> Self
fn acosh(self) -> Self
fn atanh(self) -> Self
fn log(self, base: Self::RealField) -> Self
fn log2(self) -> Self
fn log10(self) -> Self
fn ln(self) -> Self
fn ln_1p(self) -> Self
fn sqrt(self) -> Self
fn exp(self) -> Self
fn exp2(self) -> Self
fn exp_m1(self) -> Self
fn powi(self, n: i32) -> Self
fn powf(self, n: Self::RealField) -> Self
fn powc(self, n: Self) -> Self
fn cbrt(self) -> Self
fn is_finite(&self) -> bool
fn try_sqrt(self) -> Option<Self>
Source§fn to_polar(self) -> (Self::RealField, Self::RealField)
fn to_polar(self) -> (Self::RealField, Self::RealField)
Source§fn to_exp(self) -> (Self::RealField, Self)
fn to_exp(self) -> (Self::RealField, Self)
fn sinh_cosh(self) -> (Self, Self)
fn sinhc(self) -> Self
fn coshc(self) -> Self
Source§impl<T: DualNum<F>, F: DualNumFloat> DivAssign<F> for Dual2<T, F>
impl<T: DualNum<F>, F: DualNumFloat> DivAssign<F> for Dual2<T, F>
Source§fn div_assign(&mut self, other: F)
fn div_assign(&mut self, other: F)
/=
operation. Read moreSource§impl<T: DualNum<F>, F: Float> DivAssign for Dual2<T, F>
impl<T: DualNum<F>, F: Float> DivAssign for Dual2<T, F>
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
/=
operation. Read moreSource§impl<T: DualNum<F>, F: DualNumFloat> DualNum<F> for Dual2<T, F>
impl<T: DualNum<F>, F: DualNumFloat> DualNum<F> for Dual2<T, F>
Source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Source§impl<T: DualNum<F>, F: Float + FloatConst> FloatConst for Dual2<T, F>
impl<T: DualNum<F>, F: Float + FloatConst> FloatConst for Dual2<T, F>
Source§fn FRAC_1_SQRT_2() -> Self
fn FRAC_1_SQRT_2() -> Self
1.0 / sqrt(2.0)
.Source§fn FRAC_2_SQRT_PI() -> Self
fn FRAC_2_SQRT_PI() -> Self
2.0 / sqrt(π)
.Source§impl<T: DualNum<F>, F: Float + FromPrimitive> FromPrimitive for Dual2<T, F>
impl<T: DualNum<F>, F: Float + FromPrimitive> FromPrimitive for Dual2<T, F>
Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moreSource§impl<T: DualNum<F>, F: DualNumFloat> MulAssign<F> for Dual2<T, F>
impl<T: DualNum<F>, F: DualNumFloat> MulAssign<F> for Dual2<T, F>
Source§fn mul_assign(&mut self, other: F)
fn mul_assign(&mut self, other: F)
*=
operation. Read moreSource§impl<T: DualNum<F>, F: Float> MulAssign for Dual2<T, F>
impl<T: DualNum<F>, F: Float> MulAssign for Dual2<T, F>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*=
operation. Read moreSource§impl<T: DualNum<F> + Signed, F: Float> Num for Dual2<T, F>
impl<T: DualNum<F> + Signed, F: Float> Num for Dual2<T, F>
type FromStrRadixErr = <F as Num>::FromStrRadixErr
Source§fn from_str_radix(
_str: &str,
_radix: u32,
) -> Result<Self, Self::FromStrRadixErr>
fn from_str_radix( _str: &str, _radix: u32, ) -> Result<Self, Self::FromStrRadixErr>
2..=36
). Read moreSource§impl<T: DualNum<F> + PartialEq, F: Float> PartialEq for Dual2<T, F>
Comparisons are only made based on the real part. This allows the code to follow the
same execution path as real-valued code would.
impl<T: DualNum<F> + PartialEq, F: Float> PartialEq for Dual2<T, F>
Comparisons are only made based on the real part. This allows the code to follow the same execution path as real-valued code would.
Source§impl<T: DualNum<F> + PartialOrd, F: Float> PartialOrd for Dual2<T, F>
Like PartialEq, comparisons are only made based on the real part. This allows the code to follow the
same execution path as real-valued code would.
impl<T: DualNum<F> + PartialOrd, F: Float> PartialOrd for Dual2<T, F>
Like PartialEq, comparisons are only made based on the real part. This allows the code to follow the same execution path as real-valued code would.
Source§impl<T> RealField for Dual2<T, T::Element>where
T: DualNum<T::Element> + SupersetOf<T> + Sync + Send + SupersetOf<T::Element> + SupersetOf<f32> + SupersetOf<f64> + SimdPartialOrd + PartialOrd + RelativeEq + AbsDiffEq<Epsilon = T> + SimdValue<Element = T, SimdBool = bool> + UlpsEq + AbsDiffEq,
T::Element: DualNum<T::Element> + Scalar + DualNumFloat,
impl<T> RealField for Dual2<T, T::Element>where
T: DualNum<T::Element> + SupersetOf<T> + Sync + Send + SupersetOf<T::Element> + SupersetOf<f32> + SupersetOf<f64> + SimdPartialOrd + PartialOrd + RelativeEq + AbsDiffEq<Epsilon = T> + SimdValue<Element = T, SimdBool = bool> + UlpsEq + AbsDiffEq,
T::Element: DualNum<T::Element> + Scalar + DualNumFloat,
Source§fn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Got to be careful using this, because it throws away the derivatives of the one not chosen
Source§fn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Got to be careful using this, because it throws away the derivatives of the one not chosen
Source§fn clamp(self, min: Self, max: Self) -> Self
fn clamp(self, min: Self, max: Self) -> Self
If the min/max values are constants and the clamping has an effect, you lose your gradients.
fn atan2(self, other: Self) -> Self
fn pi() -> Self
fn two_pi() -> Self
fn frac_pi_2() -> Self
fn frac_pi_3() -> Self
fn frac_pi_4() -> Self
fn frac_pi_6() -> Self
fn frac_pi_8() -> Self
fn frac_1_pi() -> Self
fn frac_2_pi() -> Self
fn frac_2_sqrt_pi() -> Self
fn e() -> Self
fn log2_e() -> Self
fn log10_e() -> Self
fn ln_2() -> Self
fn ln_10() -> Self
Source§fn is_sign_positive(&self) -> bool
fn is_sign_positive(&self) -> bool
Source§fn is_sign_negative(&self) -> bool
fn is_sign_negative(&self) -> bool
Source§impl<T: DualNum<F> + RelativeEq<Epsilon = T>, F: Float> RelativeEq for Dual2<T, F>
Like PartialEq, comparisons are only made based on the real part. This allows the code to follow the
same execution path as real-valued code would.
impl<T: DualNum<F> + RelativeEq<Epsilon = T>, F: Float> RelativeEq for Dual2<T, F>
Like PartialEq, comparisons are only made based on the real part. This allows the code to follow the same execution path as real-valued code would.
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
RelativeEq::relative_eq
.Source§impl<T: DualNum<F>, F> RemAssign<F> for Dual2<T, F>
impl<T: DualNum<F>, F> RemAssign<F> for Dual2<T, F>
Source§fn rem_assign(&mut self, _other: F)
fn rem_assign(&mut self, _other: F)
%=
operation. Read moreSource§impl<T: DualNum<F>, F> RemAssign for Dual2<T, F>
impl<T: DualNum<F>, F> RemAssign for Dual2<T, F>
Source§fn rem_assign(&mut self, _other: Self)
fn rem_assign(&mut self, _other: Self)
%=
operation. Read moreSource§impl<T: DualNum<F>, F: DualNumFloat> Signed for Dual2<T, F>
impl<T: DualNum<F>, F: DualNumFloat> Signed for Dual2<T, F>
Source§fn is_positive(&self) -> bool
fn is_positive(&self) -> bool
Source§fn is_negative(&self) -> bool
fn is_negative(&self) -> bool
Source§impl<T> SimdValue for Dual2<T, T::Element>
The SimdValue trait is for rearranging data into a form more suitable for Simd,
and rearranging it back into a usable form. It is not documented particularly well.
impl<T> SimdValue for Dual2<T, T::Element>
The SimdValue trait is for rearranging data into a form more suitable for Simd, and rearranging it back into a usable form. It is not documented particularly well.
The primary job of this SimdValue impl is to allow people to use simba::simd::f32x4
etc,
instead of f32/f64. Those types implement nalgebra::SimdRealField/ComplexField, so they
behave like scalars. When we use them, we would have Dual<f32x4, f32, N>
etc, with our
F parameter set to <T as SimdValue>::Element
. We will need to be able to split up that type
into four of Dual in order to get out of simd-land. That’s what the SimdValue trait is for.
Ultimately, someone will have to to implement SimdRealField on Dual and call the
simd_ functions of <T as SimdRealField>
. That’s future work for someone who finds
num_dual is not fast enough.
Unfortunately, doing anything with SIMD is blocked on https://github.com/dimforge/simba/issues/44.
Source§type Element = Dual2<<T as SimdValue>::Element, <T as SimdValue>::Element>
type Element = Dual2<<T as SimdValue>::Element, <T as SimdValue>::Element>
Source§type SimdBool = <T as SimdValue>::SimdBool
type SimdBool = <T as SimdValue>::SimdBool
self
.Source§unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
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> SubAssign<F> for Dual2<T, F>
impl<T: DualNum<F>, F> SubAssign<F> for Dual2<T, F>
Source§fn sub_assign(&mut self, other: F)
fn sub_assign(&mut self, other: F)
-=
operation. Read moreSource§impl<T: DualNum<F>, F> SubAssign for Dual2<T, F>
impl<T: DualNum<F>, F> SubAssign for Dual2<T, F>
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
-=
operation. Read moreSource§impl<TSuper, FSuper, T, F> SubsetOf<Dual2<TSuper, FSuper>> for Dual2<T, F>
impl<TSuper, FSuper, T, F> SubsetOf<Dual2<TSuper, FSuper>> for Dual2<T, F>
Source§fn to_superset(&self) -> Dual2<TSuper, FSuper>
fn to_superset(&self) -> Dual2<TSuper, FSuper>
self
to the equivalent element of its superset.Source§fn from_superset(element: &Dual2<TSuper, FSuper>) -> Option<Self>
fn from_superset(element: &Dual2<TSuper, FSuper>) -> Option<Self>
self
from the equivalent element of its
superset. Read moreSource§fn from_superset_unchecked(element: &Dual2<TSuper, FSuper>) -> Self
fn from_superset_unchecked(element: &Dual2<TSuper, FSuper>) -> Self
self.to_superset
but without any property checks. Always succeeds.Source§fn is_in_subset(element: &Dual2<TSuper, FSuper>) -> bool
fn is_in_subset(element: &Dual2<TSuper, FSuper>) -> bool
element
is actually part of the subset Self
(and can be converted to it).Source§impl<TSuper, FSuper> SupersetOf<f32> for Dual2<TSuper, FSuper>
impl<TSuper, FSuper> SupersetOf<f32> for Dual2<TSuper, FSuper>
Source§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> f32
fn to_subset_unchecked(&self) -> f32
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &f32) -> Self
fn from_subset(element: &f32) -> Self
self
to the equivalent element of its superset.Source§impl<TSuper, FSuper> SupersetOf<f64> for Dual2<TSuper, FSuper>
impl<TSuper, FSuper> SupersetOf<f64> for Dual2<TSuper, FSuper>
Source§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> f64
fn to_subset_unchecked(&self) -> f64
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &f64) -> Self
fn from_subset(element: &f64) -> Self
self
to the equivalent element of its superset.Source§impl<T: DualNum<F> + UlpsEq<Epsilon = T>, F: Float> UlpsEq for Dual2<T, F>
impl<T: DualNum<F> + UlpsEq<Epsilon = T>, F: Float> UlpsEq for Dual2<T, F>
impl<T: Copy + DualNum<F>, F: Copy> Copy for Dual2<T, F>
impl<T> Field for Dual2<T, T::Element>
Auto Trait Implementations§
impl<T, F> Freeze for Dual2<T, F>where
T: Freeze,
impl<T, F> RefUnwindSafe for Dual2<T, F>where
T: RefUnwindSafe,
F: RefUnwindSafe,
impl<T, F> Send for Dual2<T, F>
impl<T, F> Sync for Dual2<T, F>
impl<T, F> Unpin for Dual2<T, F>
impl<T, F> UnwindSafe for Dual2<T, F>where
T: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BesselDual for T
impl<T> BesselDual for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SimdComplexField for Twhere
T: ComplexField,
impl<T> SimdComplexField for Twhere
T: ComplexField,
Source§type SimdRealField = <T as ComplexField>::RealField
type SimdRealField = <T as ComplexField>::RealField
Source§fn from_simd_real(re: <T as SimdComplexField>::SimdRealField) -> T
fn from_simd_real(re: <T as SimdComplexField>::SimdRealField) -> T
Source§fn simd_real(self) -> <T as SimdComplexField>::SimdRealField
fn simd_real(self) -> <T as SimdComplexField>::SimdRealField
Source§fn simd_imaginary(self) -> <T as SimdComplexField>::SimdRealField
fn simd_imaginary(self) -> <T as SimdComplexField>::SimdRealField
Source§fn simd_modulus(self) -> <T as SimdComplexField>::SimdRealField
fn simd_modulus(self) -> <T as SimdComplexField>::SimdRealField
Source§fn simd_modulus_squared(self) -> <T as SimdComplexField>::SimdRealField
fn simd_modulus_squared(self) -> <T as SimdComplexField>::SimdRealField
Source§fn simd_argument(self) -> <T as SimdComplexField>::SimdRealField
fn simd_argument(self) -> <T as SimdComplexField>::SimdRealField
Source§fn simd_norm1(self) -> <T as SimdComplexField>::SimdRealField
fn simd_norm1(self) -> <T as SimdComplexField>::SimdRealField
Source§fn simd_scale(self, factor: <T as SimdComplexField>::SimdRealField) -> T
fn simd_scale(self, factor: <T as SimdComplexField>::SimdRealField) -> T
factor
.Source§fn simd_unscale(self, factor: <T as SimdComplexField>::SimdRealField) -> T
fn simd_unscale(self, factor: <T as SimdComplexField>::SimdRealField) -> T
factor
.Source§fn simd_to_polar(
self,
) -> (<T as SimdComplexField>::SimdRealField, <T as SimdComplexField>::SimdRealField)
fn simd_to_polar( self, ) -> (<T as SimdComplexField>::SimdRealField, <T as SimdComplexField>::SimdRealField)
Source§fn simd_to_exp(self) -> (<T as SimdComplexField>::SimdRealField, T)
fn simd_to_exp(self) -> (<T as SimdComplexField>::SimdRealField, T)
Source§fn simd_signum(self) -> T
fn simd_signum(self) -> T
self / self.modulus()
fn simd_floor(self) -> T
fn simd_ceil(self) -> T
fn simd_round(self) -> T
fn simd_trunc(self) -> T
fn simd_fract(self) -> T
fn simd_mul_add(self, a: T, b: T) -> T
Source§fn simd_abs(self) -> <T as SimdComplexField>::SimdRealField
fn simd_abs(self) -> <T as SimdComplexField>::SimdRealField
self / self.signum()
. Read moreSource§fn simd_hypot(self, other: T) -> <T as SimdComplexField>::SimdRealField
fn simd_hypot(self, other: T) -> <T as SimdComplexField>::SimdRealField
fn simd_recip(self) -> T
fn simd_conjugate(self) -> T
fn simd_sin(self) -> T
fn simd_cos(self) -> T
fn simd_sin_cos(self) -> (T, T)
fn simd_sinh_cosh(self) -> (T, T)
fn simd_tan(self) -> T
fn simd_asin(self) -> T
fn simd_acos(self) -> T
fn simd_atan(self) -> T
fn simd_sinh(self) -> T
fn simd_cosh(self) -> T
fn simd_tanh(self) -> T
fn simd_asinh(self) -> T
fn simd_acosh(self) -> T
fn simd_atanh(self) -> T
fn simd_sinhc(self) -> T
fn simd_coshc(self) -> T
fn simd_log(self, base: <T as SimdComplexField>::SimdRealField) -> T
fn simd_log2(self) -> T
fn simd_log10(self) -> T
fn simd_ln(self) -> T
fn simd_ln_1p(self) -> T
fn simd_sqrt(self) -> T
fn simd_exp(self) -> T
fn simd_exp2(self) -> T
fn simd_exp_m1(self) -> T
fn simd_powi(self, n: i32) -> T
fn simd_powf(self, n: <T as SimdComplexField>::SimdRealField) -> T
fn simd_powc(self, n: T) -> T
fn simd_cbrt(self) -> T
Source§fn simd_horizontal_sum(self) -> <T as SimdValue>::Element
fn simd_horizontal_sum(self) -> <T as SimdValue>::Element
self
.Source§fn simd_horizontal_product(self) -> <T as SimdValue>::Element
fn simd_horizontal_product(self) -> <T as SimdValue>::Element
self
.Source§impl<T> SimdPartialOrd for T
impl<T> SimdPartialOrd for T
Source§fn simd_ge(self, other: T) -> <T as SimdValue>::SimdBool
fn simd_ge(self, other: T) -> <T as SimdValue>::SimdBool
>=
comparison.Source§fn simd_le(self, other: T) -> <T as SimdValue>::SimdBool
fn simd_le(self, other: T) -> <T as SimdValue>::SimdBool
<=
comparison.Source§fn simd_clamp(self, min: T, max: T) -> T
fn simd_clamp(self, min: T, max: T) -> T
self
between the corresponding lane of min
and max
.Source§fn simd_horizontal_min(self) -> <T as SimdValue>::Element
fn simd_horizontal_min(self) -> <T as SimdValue>::Element
self
.Source§fn simd_horizontal_max(self) -> <T as SimdValue>::Element
fn simd_horizontal_max(self) -> <T as SimdValue>::Element
self
.Source§impl<T> SimdRealField for Twhere
T: RealField,
impl<T> SimdRealField for Twhere
T: RealField,
fn simd_atan2(self, other: T) -> T
fn simd_default_epsilon() -> T
Source§fn simd_copysign(self, sign: T) -> T
fn simd_copysign(self, sign: T) -> T
fn simd_pi() -> T
fn simd_two_pi() -> T
fn simd_frac_pi_2() -> T
fn simd_frac_pi_3() -> T
fn simd_frac_pi_4() -> T
fn simd_frac_pi_6() -> T
fn simd_frac_pi_8() -> T
fn simd_frac_1_pi() -> T
fn simd_frac_2_pi() -> T
fn simd_frac_2_sqrt_pi() -> T
fn simd_e() -> T
fn simd_log2_e() -> T
fn simd_log10_e() -> T
fn simd_ln_2() -> T
fn simd_ln_10() -> T
Source§impl<T> SimdSigned for T
impl<T> SimdSigned for T
Source§fn simd_abs_sub(&self, other: &T) -> T
fn simd_abs_sub(&self, other: &T) -> T
self
. Read moreSource§fn simd_signum(&self) -> T
fn simd_signum(&self) -> T
Self
.Source§fn is_simd_positive(&self) -> <T as SimdValue>::SimdBool
fn is_simd_positive(&self) -> <T as SimdValue>::SimdBool
Source§fn is_simd_negative(&self) -> <T as SimdValue>::SimdBool
fn is_simd_negative(&self) -> <T as SimdValue>::SimdBool
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>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.