Struct num_dual::DualVec

source ·
pub struct DualVec<T: DualNum<F>, F, D: Dim>{
    pub re: T,
    pub eps: Derivative<T, F, D, U1>,
    /* private fields */
}
Expand description

A vector dual number for the calculations of gradients or Jacobians.

Fields§

§re: T

Real part of the dual number

§eps: Derivative<T, F, D, U1>

Derivative part of the dual number

Implementations§

source§

impl<T: DualNum<F>, F, D: Dim> DualVec<T, F, D>

source

pub fn new(re: T, eps: Derivative<T, F, D, U1>) -> Self

Create a new dual number from its fields.

source§

impl<T: DualNum<F> + Zero, F, D: Dim> DualVec<T, F, D>

source

pub fn from_re(re: T) -> Self

Create a new dual number from the real part.

Trait Implementations§

source§

impl<T: DualNum<F> + AbsDiffEq<Epsilon = T>, F: Float, D: Dim> AbsDiffEq for DualVec<T, F, D>

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.

§

type Epsilon = DualVec<T, F, D>

Used for specifying relative comparisons.
source§

fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
source§

fn default_epsilon() -> Self::Epsilon

The default tolerance to use when testing values that are close together. Read more
source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
source§

impl<'a, 'b, T: DualNum<F>, F: Float, D: Dim> Add<&'a DualVec<T, F, D>> for &'b DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the + operator.
source§

fn add(self, other: &DualVec<T, F, D>) -> DualVec<T, F, D>

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Add<&DualVec<T, F, D>> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &DualVec<T, F, D>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Add<DualVec<T, F, D>> for &DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the + operator.
source§

fn add(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> Add<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the + operator.
source§

fn add(self, other: F) -> Self

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Add for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the + operator.
source§

fn add(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> AddAssign<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn add_assign(&mut self, other: F)

Performs the += operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> AddAssign for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
source§

impl<T: Clone + DualNum<F>, F: Clone, D: Clone + Dim> Clone for DualVec<T, F, D>

source§

fn clone(&self) -> DualVec<T, F, D>

Returns a copy 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, D: Dim> ComplexField for DualVec<T, T::Element, D>
where T: DualNum<T::Element> + SupersetOf<T> + AbsDiffEq<Epsilon = T> + Sync + Send + SupersetOf<T::Element> + SupersetOf<f64> + SimdPartialOrd + PartialOrd + SimdValue<Element = T, SimdBool = bool> + RelativeEq + UlpsEq + AbsDiffEq, T::Element: DualNum<T::Element> + Scalar + DualNumFloat + Sync + Send, DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, U1> + Allocator<T, D, D>, <DefaultAllocator as Allocator<T, D>>::Buffer: Sync + Send,

§

type RealField = DualVec<T, <T as SimdValue>::Element, D>

source§

fn from_real(re: Self::RealField) -> Self

Builds a pure-real complex number from the given value.
source§

fn real(self) -> Self::RealField

The real part of this complex number.
source§

fn imaginary(self) -> Self::RealField

The imaginary part of this complex number.
source§

fn modulus(self) -> Self::RealField

The modulus of this complex number.
source§

fn modulus_squared(self) -> Self::RealField

The squared modulus of this complex number.
source§

fn argument(self) -> Self::RealField

The argument of this complex number.
source§

fn norm1(self) -> Self::RealField

The sum of the absolute value of this complex number’s real and imaginary part.
source§

fn scale(self, factor: Self::RealField) -> Self

Multiplies this complex number by factor.
source§

fn unscale(self, factor: Self::RealField) -> Self

Divides this complex number by factor.
source§

fn floor(self) -> Self

source§

fn ceil(self) -> Self

source§

fn round(self) -> Self

source§

fn trunc(self) -> Self

source§

fn fract(self) -> Self

source§

fn mul_add(self, a: Self, b: Self) -> Self

source§

fn abs(self) -> Self::RealField

The absolute value of this complex number: self / self.signum(). Read more
source§

fn hypot(self, other: Self) -> Self::RealField

Computes (self.conjugate() * self + other.conjugate() * other).sqrt()
source§

fn recip(self) -> Self

source§

fn conjugate(self) -> Self

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn sin_cos(self) -> (Self, Self)

source§

fn tan(self) -> Self

source§

fn asin(self) -> Self

source§

fn acos(self) -> Self

source§

fn atan(self) -> Self

source§

fn sinh(self) -> Self

source§

fn cosh(self) -> Self

source§

fn tanh(self) -> Self

source§

fn asinh(self) -> Self

source§

fn acosh(self) -> Self

source§

fn atanh(self) -> Self

source§

fn log(self, base: Self::RealField) -> Self

source§

fn log2(self) -> Self

source§

fn log10(self) -> Self

source§

fn ln(self) -> Self

source§

fn ln_1p(self) -> Self

source§

fn sqrt(self) -> Self

source§

fn exp(self) -> Self

source§

fn exp2(self) -> Self

source§

fn exp_m1(self) -> Self

source§

fn powi(self, n: i32) -> Self

source§

fn powf(self, n: Self::RealField) -> Self

source§

fn powc(self, n: Self) -> Self

source§

fn cbrt(self) -> Self

source§

fn is_finite(&self) -> bool

source§

fn try_sqrt(self) -> Option<Self>

source§

fn to_polar(self) -> (Self::RealField, Self::RealField)

The polar form of this complex number: (modulus, arg)
source§

fn to_exp(self) -> (Self::RealField, Self)

The exponential form of this complex number: (modulus, e^{i arg})
source§

fn signum(self) -> Self

The exponential part of this complex number: self / self.modulus()
source§

fn sinh_cosh(self) -> (Self, Self)

source§

fn sinc(self) -> Self

Cardinal sine
source§

fn sinhc(self) -> Self

source§

fn cosc(self) -> Self

Cardinal cos
source§

fn coshc(self) -> Self

source§

impl<T: Debug + DualNum<F>, F: Debug, D: Debug + Dim> Debug for DualVec<T, F, D>

source§

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

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

impl<T: DualNum<F>, F, D: Dim> Display for DualVec<T, F, D>

source§

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

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

impl<'a, 'b, T: DualNum<F>, F: Float, D: Dim> Div<&'a DualVec<T, F, D>> for &'b DualVec<T, F, D>

§

type Output = DualVec<T, F, D>

The resulting type after applying the / operator.
source§

fn div(self, other: &DualVec<T, F, D>) -> DualVec<T, F, D>

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Div<&DualVec<T, F, D>> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the / operator.
source§

fn div(self, rhs: &DualVec<T, F, D>) -> Self::Output

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Div<DualVec<T, F, D>> for &DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the / operator.
source§

fn div(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, D: Dim> Div<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the / operator.
source§

fn div(self, other: F) -> Self

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Div for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the / operator.
source§

fn div(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, D: Dim> DivAssign<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn div_assign(&mut self, other: F)

Performs the /= operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> DivAssign for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, D: Dim> DualNum<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

const NDERIV: usize = _

Highest derivative that can be calculated with this struct
source§

fn re(&self) -> F

Real part (0th derivative) of the number
source§

fn recip(&self) -> Self

Reciprocal (inverse) of a number 1/x.
source§

fn powi(&self, exp: i32) -> Self

Power with integer exponent x^n
source§

fn powf(&self, n: F) -> Self

Power with real exponent x^n
source§

fn sqrt(&self) -> Self

Square root
source§

fn cbrt(&self) -> Self

Cubic root
source§

fn exp(&self) -> Self

Exponential e^x
source§

fn exp2(&self) -> Self

Exponential with base 2 2^x
source§

fn exp_m1(&self) -> Self

Exponential minus 1 e^x-1
source§

fn ln(&self) -> Self

Natural logarithm
source§

fn log(&self, base: F) -> Self

Logarithm with arbitrary base
source§

fn log2(&self) -> Self

Logarithm with base 2
source§

fn log10(&self) -> Self

Logarithm with base 10
source§

fn ln_1p(&self) -> Self

Logarithm on x plus one ln(1+x)
source§

fn sin(&self) -> Self

Sine
source§

fn cos(&self) -> Self

Cosine
source§

fn sin_cos(&self) -> (Self, Self)

Calculate sine and cosine simultaneously
source§

fn tan(&self) -> Self

Tangent
source§

fn asin(&self) -> Self

Arcsine
source§

fn acos(&self) -> Self

Arccosine
source§

fn atan(&self) -> Self

Arctangent
source§

fn sinh(&self) -> Self

Hyperbolic sine
source§

fn cosh(&self) -> Self

Hyperbolic cosine
source§

fn tanh(&self) -> Self

Hyperbolic tangent
source§

fn asinh(&self) -> Self

Area hyperbolic sine
source§

fn acosh(&self) -> Self

Area hyperbolic cosine
source§

fn atanh(&self) -> Self

Area hyperbolic tangent
source§

fn sph_j0(&self) -> Self

0th order spherical Bessel function of the first kind
source§

fn sph_j1(&self) -> Self

1st order spherical Bessel function of the first kind
source§

fn sph_j2(&self) -> Self

2nd order spherical Bessel function of the first kind
source§

fn mul_add(&self, a: Self, b: Self) -> Self

Fused multiply-add
source§

fn powd(&self, exp: Self) -> Self

Power with dual exponent x^n
source§

impl<T: DualNum<F>, F: Float + FloatConst, D: Dim> FloatConst for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn E() -> Self

Return Euler’s number.
source§

fn FRAC_1_PI() -> Self

Return 1.0 / π.
source§

fn FRAC_1_SQRT_2() -> Self

Return 1.0 / sqrt(2.0).
source§

fn FRAC_2_PI() -> Self

Return 2.0 / π.
source§

fn FRAC_2_SQRT_PI() -> Self

Return 2.0 / sqrt(π).
source§

fn FRAC_PI_2() -> Self

Return π / 2.0.
source§

fn FRAC_PI_3() -> Self

Return π / 3.0.
source§

fn FRAC_PI_4() -> Self

Return π / 4.0.
source§

fn FRAC_PI_6() -> Self

Return π / 6.0.
source§

fn FRAC_PI_8() -> Self

Return π / 8.0.
source§

fn LN_10() -> Self

Return ln(10.0).
source§

fn LN_2() -> Self

Return ln(2.0).
source§

fn LOG10_E() -> Self

Return log10(e).
source§

fn LOG2_E() -> Self

Return log2(e).
source§

fn PI() -> Self

Return Archimedes’ constant π.
source§

fn SQRT_2() -> Self

Return sqrt(2.0).
source§

fn TAU() -> Self
where Self: Sized + Add<Output = Self>,

Return the full circle constant τ.
source§

fn LOG10_2() -> Self
where Self: Sized + Div<Output = Self>,

Return log10(2.0).
source§

fn LOG2_10() -> Self
where Self: Sized + Div<Output = Self>,

Return log2(10.0).
source§

impl<T: DualNum<F>, F, D: Dim> From<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn from(float: F) -> Self

Converts to this type from the input type.
source§

impl<T: DualNum<F>, F: Float + FromPrimitive, D: Dim> FromPrimitive for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn from_isize(n: isize) -> Option<Self>

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

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

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

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

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

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_usize(n: usize) -> Option<Self>

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

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

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

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

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

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, D: Dim> Inv for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The result after applying the operator.
source§

fn inv(self) -> Self

Returns the multiplicative inverse of self. Read more
source§

impl<'a, 'b, T: DualNum<F>, F: Float, D: Dim> Mul<&'a DualVec<T, F, D>> for &'b DualVec<T, F, D>

§

type Output = DualVec<T, F, D>

The resulting type after applying the * operator.
source§

fn mul(self, other: &DualVec<T, F, D>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Mul<&DualVec<T, F, D>> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &DualVec<T, F, D>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Mul<DualVec<T, F, D>> for &DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, D: Dim> Mul<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the * operator.
source§

fn mul(self, other: F) -> Self

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Mul for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, D: Dim> MulAssign<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn mul_assign(&mut self, other: F)

Performs the *= operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> MulAssign for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Neg for &DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

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: Float, D: Dim> Neg for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl<T: DualNum<F> + Signed, F: Float, D: Dim> Num for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type FromStrRadixErr = <F as Num>::FromStrRadixErr

source§

fn from_str_radix( _str: &str, _radix: u32 ) -> Result<Self, Self::FromStrRadixErr>

Convert from a string and radix (typically 2..=36). Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> One for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
source§

impl<T: DualNum<F> + PartialEq, F: Float, D: Dim> PartialEq for DualVec<T, F, D>

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 eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: DualNum<F> + PartialOrd, F: Float, D: Dim> PartialOrd for DualVec<T, F, D>

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 partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a, T: DualNum<F>, F: Float, D: Dim> Product<&'a DualVec<T, F, D>> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn product<I>(iter: I) -> Self
where I: Iterator<Item = &'a DualVec<T, F, D>>,

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<T: DualNum<F>, F: Float, D: Dim> Product for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn product<I>(iter: I) -> Self
where I: Iterator<Item = Self>,

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<T, D: Dim> RealField for DualVec<T, T::Element, D>
where T: DualNum<T::Element> + SupersetOf<T> + Sync + Send + SupersetOf<T::Element> + SupersetOf<f64> + SimdPartialOrd + PartialOrd + RelativeEq + AbsDiffEq<Epsilon = T> + SimdValue<Element = T, SimdBool = bool> + UlpsEq + AbsDiffEq, T::Element: DualNum<T::Element> + Scalar + DualNumFloat, DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, U1> + Allocator<T, D, D>, <DefaultAllocator as Allocator<T, D>>::Buffer: Sync + Send,

source§

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

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

If the min/max values are constants and the clamping has an effect, you lose your gradients.

source§

fn copysign(self, sign: Self) -> Self

Copies the sign of sign to self. Read more
source§

fn atan2(self, other: Self) -> Self

source§

fn pi() -> Self

source§

fn two_pi() -> Self

source§

fn frac_pi_2() -> Self

source§

fn frac_pi_3() -> Self

source§

fn frac_pi_4() -> Self

source§

fn frac_pi_6() -> Self

source§

fn frac_pi_8() -> Self

source§

fn frac_1_pi() -> Self

source§

fn frac_2_pi() -> Self

source§

fn frac_2_sqrt_pi() -> Self

source§

fn e() -> Self

source§

fn log2_e() -> Self

source§

fn log10_e() -> Self

source§

fn ln_2() -> Self

source§

fn ln_10() -> Self

source§

fn is_sign_positive(&self) -> bool

Is the sign of this real number positive?
source§

fn is_sign_negative(&self) -> bool

Is the sign of this real number negative?
source§

fn min_value() -> Option<Self>

The smallest finite positive value representable using this type.
source§

fn max_value() -> Option<Self>

The largest finite positive value representable using this type.
source§

impl<T: DualNum<F> + RelativeEq<Epsilon = T>, F: Float, D: Dim> RelativeEq for DualVec<T, F, D>

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

The default relative tolerance for testing values that are far-apart. Read more
source§

fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

The inverse of RelativeEq::relative_eq.
source§

impl<'a, 'b, T: DualNum<F>, F, D: Dim> Rem<&'a DualVec<T, F, D>> for &'b DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the % operator.
source§

fn rem(self, _other: &DualVec<T, F, D>) -> DualVec<T, F, D>

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Rem<&DualVec<T, F, D>> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &DualVec<T, F, D>) -> Self::Output

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Rem<DualVec<T, F, D>> for &DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> Rem<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the % operator.
source§

fn rem(self, _other: F) -> Self

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Rem for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> RemAssign<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn rem_assign(&mut self, _other: F)

Performs the %= operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> RemAssign for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn rem_assign(&mut self, _other: Self)

Performs the %= operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, D: Dim> Signed for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn abs(&self) -> Self

Computes the absolute value. Read more
source§

fn abs_sub(&self, other: &Self) -> Self

The positive difference of two numbers. Read more
source§

fn signum(&self) -> Self

Returns the sign of the number. Read more
source§

fn is_positive(&self) -> bool

Returns true if the number is positive and false if the number is zero or negative.
source§

fn is_negative(&self) -> bool

Returns true if the number is negative and false if the number is zero or positive.
source§

impl<T, D: Dim> SimdValue for DualVec<T, T::Element, D>

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

§

type Element = DualVec<<T as SimdValue>::Element, <T as SimdValue>::Element, D>

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

type SimdBool = <T as SimdValue>::SimdBool

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

fn lanes() -> usize

The number of lanes of this SIMD value.
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.
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.
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<'a, 'b, T: DualNum<F>, F: Float, D: Dim> Sub<&'a DualVec<T, F, D>> for &'b DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the - operator.
source§

fn sub(self, other: &DualVec<T, F, D>) -> DualVec<T, F, D>

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Sub<&DualVec<T, F, D>> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &DualVec<T, F, D>) -> Self::Output

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Sub<DualVec<T, F, D>> for &DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> Sub<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the - operator.
source§

fn sub(self, other: F) -> Self

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F: Float, D: Dim> Sub for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

§

type Output = DualVec<T, F, D>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: DualVec<T, F, D>) -> Self::Output

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> SubAssign<F> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn sub_assign(&mut self, other: F)

Performs the -= operation. Read more
source§

impl<T: DualNum<F>, F, D: Dim> SubAssign for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
source§

impl<TSuper, FSuper, T, F, D: Dim> SubsetOf<DualVec<TSuper, FSuper, D>> for DualVec<T, F, D>
where TSuper: DualNum<FSuper> + SupersetOf<T>, T: DualNum<F>, DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, U1> + Allocator<T, D, D> + Allocator<TSuper, D> + Allocator<TSuper, U1, D> + Allocator<TSuper, D, U1> + Allocator<TSuper, D, D>,

source§

fn to_superset(&self) -> DualVec<TSuper, FSuper, D>

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

fn from_superset(element: &DualVec<TSuper, FSuper, D>) -> 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: &DualVec<TSuper, FSuper, D>) -> Self

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

fn is_in_subset(element: &DualVec<TSuper, FSuper, D>) -> bool

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

impl<'a, T: DualNum<F>, F: Float, D: Dim> Sum<&'a DualVec<T, F, D>> for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = &'a DualVec<T, F, D>>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<T: DualNum<F>, F: Float, D: Dim> Sum for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = Self>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<TSuper, FSuper, D: Dim> SupersetOf<f32> for DualVec<TSuper, FSuper, D>
where TSuper: DualNum<FSuper> + SupersetOf<f32>, DefaultAllocator: Allocator<TSuper, D> + Allocator<TSuper, U1, D> + Allocator<TSuper, D, U1> + Allocator<TSuper, D, D>,

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

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

fn from_subset(element: &f32) -> Self

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

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

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

impl<TSuper, FSuper, D: Dim> SupersetOf<f64> for DualVec<TSuper, FSuper, D>
where TSuper: DualNum<FSuper> + SupersetOf<f64>, DefaultAllocator: Allocator<TSuper, D> + Allocator<TSuper, U1, D> + Allocator<TSuper, D, U1> + Allocator<TSuper, D, D>,

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

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

fn from_subset(element: &f64) -> Self

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

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

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

impl<T: DualNum<F> + UlpsEq<Epsilon = T>, F: Float, D: Dim> UlpsEq for DualVec<T, F, D>

source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
source§

fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
source§

impl<T: DualNum<F>, F: Float, D: Dim> Zero for DualVec<T, F, D>
where DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, D>,

source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
source§

impl<T: DualNum<F> + Copy, F: Copy, const N: usize> Copy for DualVec<T, F, Const<N>>

source§

impl<T, D: Dim> Field for DualVec<T, T::Element, D>
where T: DualNum<T::Element> + SimdValue, T::Element: DualNum<T::Element> + Scalar + Float, DefaultAllocator: Allocator<T, D> + Allocator<T, U1, D> + Allocator<T, D, U1> + Allocator<T, D, D> + Allocator<T::Element, D> + Allocator<T::Element, U1, D> + Allocator<T::Element, D, U1> + Allocator<T::Element, D, D>,

Auto Trait Implementations§

§

impl<T, F, D> !Freeze for DualVec<T, F, D>

§

impl<T, F, D> !RefUnwindSafe for DualVec<T, F, D>

§

impl<T, F, D> !Send for DualVec<T, F, D>

§

impl<T, F, D> !Sync for DualVec<T, F, D>

§

impl<T, F, D> !Unpin for DualVec<T, F, D>

§

impl<T, F, D> !UnwindSafe for DualVec<T, F, D>

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> BesselDual for T
where T: DualNum<f64> + Copy,

source§

fn bessel_j0(self) -> Self

0th order bessel function of the first kind
source§

fn bessel_j1(self) -> Self

1st order bessel function of the first kind
source§

fn bessel_j2(self) -> Self

2nd order bessel function of the first kind
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> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
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

§

type Output = T

Should always be Self
source§

impl<T> SimdComplexField for T
where T: ComplexField,

§

type SimdRealField = <T as ComplexField>::RealField

Type of the coefficients of a complex number.
source§

fn from_simd_real(re: <T as SimdComplexField>::SimdRealField) -> T

Builds a pure-real complex number from the given value.
source§

fn simd_real(self) -> <T as SimdComplexField>::SimdRealField

The real part of this complex number.
source§

fn simd_imaginary(self) -> <T as SimdComplexField>::SimdRealField

The imaginary part of this complex number.
source§

fn simd_modulus(self) -> <T as SimdComplexField>::SimdRealField

The modulus of this complex number.
source§

fn simd_modulus_squared(self) -> <T as SimdComplexField>::SimdRealField

The squared modulus of this complex number.
source§

fn simd_argument(self) -> <T as SimdComplexField>::SimdRealField

The argument of this complex number.
source§

fn simd_norm1(self) -> <T as SimdComplexField>::SimdRealField

The sum of the absolute value of this complex number’s real and imaginary part.
source§

fn simd_scale(self, factor: <T as SimdComplexField>::SimdRealField) -> T

Multiplies this complex number by factor.
source§

fn simd_unscale(self, factor: <T as SimdComplexField>::SimdRealField) -> T

Divides this complex number by factor.
source§

fn simd_to_polar( self ) -> (<T as SimdComplexField>::SimdRealField, <T as SimdComplexField>::SimdRealField)

The polar form of this complex number: (modulus, arg)
source§

fn simd_to_exp(self) -> (<T as SimdComplexField>::SimdRealField, T)

The exponential form of this complex number: (modulus, e^{i arg})
source§

fn simd_signum(self) -> T

The exponential part of this complex number: self / self.modulus()
source§

fn simd_floor(self) -> T

source§

fn simd_ceil(self) -> T

source§

fn simd_round(self) -> T

source§

fn simd_trunc(self) -> T

source§

fn simd_fract(self) -> T

source§

fn simd_mul_add(self, a: T, b: T) -> T

source§

fn simd_abs(self) -> <T as SimdComplexField>::SimdRealField

The absolute value of this complex number: self / self.signum(). Read more
source§

fn simd_hypot(self, other: T) -> <T as SimdComplexField>::SimdRealField

Computes (self.conjugate() * self + other.conjugate() * other).sqrt()
source§

fn simd_recip(self) -> T

source§

fn simd_conjugate(self) -> T

source§

fn simd_sin(self) -> T

source§

fn simd_cos(self) -> T

source§

fn simd_sin_cos(self) -> (T, T)

source§

fn simd_sinh_cosh(self) -> (T, T)

source§

fn simd_tan(self) -> T

source§

fn simd_asin(self) -> T

source§

fn simd_acos(self) -> T

source§

fn simd_atan(self) -> T

source§

fn simd_sinh(self) -> T

source§

fn simd_cosh(self) -> T

source§

fn simd_tanh(self) -> T

source§

fn simd_asinh(self) -> T

source§

fn simd_acosh(self) -> T

source§

fn simd_atanh(self) -> T

source§

fn simd_sinc(self) -> T

Cardinal sine
source§

fn simd_sinhc(self) -> T

source§

fn simd_cosc(self) -> T

Cardinal cos
source§

fn simd_coshc(self) -> T

source§

fn simd_log(self, base: <T as SimdComplexField>::SimdRealField) -> T

source§

fn simd_log2(self) -> T

source§

fn simd_log10(self) -> T

source§

fn simd_ln(self) -> T

source§

fn simd_ln_1p(self) -> T

source§

fn simd_sqrt(self) -> T

source§

fn simd_exp(self) -> T

source§

fn simd_exp2(self) -> T

source§

fn simd_exp_m1(self) -> T

source§

fn simd_powi(self, n: i32) -> T

source§

fn simd_powf(self, n: <T as SimdComplexField>::SimdRealField) -> T

source§

fn simd_powc(self, n: T) -> T

source§

fn simd_cbrt(self) -> T

source§

fn simd_horizontal_sum(self) -> <T as SimdValue>::Element

Computes the sum of all the lanes of self.
source§

fn simd_horizontal_product(self) -> <T as SimdValue>::Element

Computes the product of all the lanes of self.
source§

impl<T> SimdPartialOrd for T
where T: SimdValue<Element = T, SimdBool = bool> + PartialOrd,

source§

fn simd_gt(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise greater than > comparison.
source§

fn simd_lt(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise less than < comparison.
source§

fn simd_ge(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise greater or equal >= comparison.
source§

fn simd_le(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise less or equal <= comparison.
source§

fn simd_eq(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise equal == comparison.
source§

fn simd_ne(self, other: T) -> <T as SimdValue>::SimdBool

Lanewise not equal != comparison.
source§

fn simd_max(self, other: T) -> T

Lanewise max value.
source§

fn simd_min(self, other: T) -> T

Lanewise min value.
source§

fn simd_clamp(self, min: T, max: T) -> T

Clamps each lane of self between the corresponding lane of min and max.
source§

fn simd_horizontal_min(self) -> <T as SimdValue>::Element

The min value among all lanes of self.
source§

fn simd_horizontal_max(self) -> <T as SimdValue>::Element

The max value among all lanes of self.
source§

impl<T> SimdRealField for T
where T: RealField,

source§

impl<T> SimdSigned for T
where T: Signed + SimdValue<SimdBool = bool>,

source§

fn simd_abs(&self) -> T

The absolute value of each lane of self.
source§

fn simd_abs_sub(&self, other: &T) -> T

The absolute difference of each lane of self. Read more
source§

fn simd_signum(&self) -> T

The signum of each lane of Self.
source§

fn is_simd_positive(&self) -> <T as SimdValue>::SimdBool

Tests which lane is positive.
source§

fn is_simd_negative(&self) -> <T as SimdValue>::SimdBool

Tests which lane is negative.
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,

§

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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

§

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> ClosedDiv<Right> for T
where T: Div<Right, Output = T> + DivAssign<Right>,

source§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + 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> NumAssign for T
where T: Num + NumAssignOps,

source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

source§

impl<T> NumRef for T
where T: Num + for<'r> NumOps<&'r T>,

source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,

source§

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