Struct num_dual::HyperDualVec

source ·
pub struct HyperDualVec<T: DualNum<F>, F, M: Dim, N: Dim>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,
{ pub re: T, pub eps1: Derivative<T, F, M, U1>, pub eps2: Derivative<T, F, U1, N>, pub eps1eps2: Derivative<T, F, M, N>, /* private fields */ }
Expand description

A vector hyper-dual number for the calculation of partial Hessians.

Fields§

§re: T

Real part of the hyper-dual number

§eps1: Derivative<T, F, M, U1>

Gradient part of the hyper-dual number

§eps2: Derivative<T, F, U1, N>

Gradient part of the hyper-dual number

§eps1eps2: Derivative<T, F, M, N>

Partial Hessian part of the hyper-dual number

Implementations§

source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

source

pub fn new( re: T, eps1: Derivative<T, F, M, U1>, eps2: Derivative<T, F, U1, N>, eps1eps2: Derivative<T, F, M, N> ) -> Self

Create a new hyper-dual number from its fields.

source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

source

pub fn from_re(re: T) -> Self

Create a new hyper-dual number from the real part.

Trait Implementations§

source§

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

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the + operator.
source§

fn add(self, other: &HyperDualVec<T, F, M, N>) -> HyperDualVec<T, F, M, N>

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Add<&HyperDualVec<T, F, M, N>> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &HyperDualVec<T, F, M, N>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> Add<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

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, M: Dim, N: Dim> Add<HyperDualVec<T, F, M, N>> for &HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the + operator.
source§

fn add(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Add for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the + operator.
source§

fn add(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> AddAssign<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn add_assign(&mut self, other: F)

Performs the += operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> AddAssign for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
source§

impl<T: Clone + DualNum<F>, F: Clone, M: Clone + Dim, N: Clone + Dim> Clone for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

source§

fn clone(&self) -> HyperDualVec<T, F, M, N>

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: Debug + DualNum<F>, F: Debug, M: Debug + Dim, N: Debug + Dim> Debug for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

source§

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

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

impl<T: DualNum<F>, F: Display, M: Dim, N: Dim> Display for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

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, M: Dim, N: Dim> Div<&'a HyperDualVec<T, F, M, N>> for &'b HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the / operator.
source§

fn div(self, other: &HyperDualVec<T, F, M, N>) -> HyperDualVec<T, F, M, N>

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Div<&HyperDualVec<T, F, M, N>> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the / operator.
source§

fn div(self, rhs: &HyperDualVec<T, F, M, N>) -> Self::Output

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, M: Dim, N: Dim> Div<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

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, M: Dim, N: Dim> Div<HyperDualVec<T, F, M, N>> for &HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the / operator.
source§

fn div(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Div for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the / operator.
source§

fn div(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the / operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, M: Dim, N: Dim> DivAssign<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn div_assign(&mut self, other: F)

Performs the /= operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> DivAssign for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, M: Dim, N: Dim> DualNum<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

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, M: Dim, N: Dim> FloatConst for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

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, M: Dim, N: Dim> From<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn from(float: F) -> Self

Converts to this type from the input type.
source§

impl<T: DualNum<F>, F: Float + FromPrimitive, M: Dim, N: Dim> FromPrimitive for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

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, M: Dim, N: Dim> Inv for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

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, M: Dim, N: Dim> Mul<&'a HyperDualVec<T, F, M, N>> for &'b HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the * operator.
source§

fn mul(self, other: &HyperDualVec<T, F, M, N>) -> HyperDualVec<T, F, M, N>

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Mul<&HyperDualVec<T, F, M, N>> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &HyperDualVec<T, F, M, N>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, M: Dim, N: Dim> Mul<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

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, M: Dim, N: Dim> Mul<HyperDualVec<T, F, M, N>> for &HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Mul for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, M: Dim, N: Dim> MulAssign<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn mul_assign(&mut self, other: F)

Performs the *= operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> MulAssign for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Neg for &HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

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, M: Dim, N: Dim> Neg for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

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, M: Dim, N: Dim> Num for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

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, M: Dim, N: Dim> One for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

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: PartialEq + DualNum<F>, F: PartialEq, M: PartialEq + Dim, N: PartialEq + Dim> PartialEq for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

source§

fn eq(&self, other: &HyperDualVec<T, F, M, N>) -> 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<'a, T: DualNum<F>, F: Float, M: Dim, N: Dim> Product<&'a HyperDualVec<T, F, M, N>> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

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

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

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Product for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

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<'a, 'b, T: DualNum<F>, F, M: Dim, N: Dim> Rem<&'a HyperDualVec<T, F, M, N>> for &'b HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the % operator.
source§

fn rem(self, _other: &HyperDualVec<T, F, M, N>) -> HyperDualVec<T, F, M, N>

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Rem<&HyperDualVec<T, F, M, N>> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &HyperDualVec<T, F, M, N>) -> Self::Output

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> Rem<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

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, M: Dim, N: Dim> Rem<HyperDualVec<T, F, M, N>> for &HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Rem for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the % operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> RemAssign<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn rem_assign(&mut self, _other: F)

Performs the %= operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> RemAssign for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn rem_assign(&mut self, _other: Self)

Performs the %= operation. Read more
source§

impl<T: DualNum<F>, F: DualNumFloat, M: Dim, N: Dim> Signed for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

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<'a, 'b, T: DualNum<F>, F: Float, M: Dim, N: Dim> Sub<&'a HyperDualVec<T, F, M, N>> for &'b HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the - operator.
source§

fn sub(self, other: &HyperDualVec<T, F, M, N>) -> HyperDualVec<T, F, M, N>

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Sub<&HyperDualVec<T, F, M, N>> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &HyperDualVec<T, F, M, N>) -> Self::Output

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> Sub<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

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, M: Dim, N: Dim> Sub<HyperDualVec<T, F, M, N>> for &HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Sub for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

§

type Output = HyperDualVec<T, F, M, N>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: HyperDualVec<T, F, M, N>) -> Self::Output

Performs the - operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> SubAssign<F> for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn sub_assign(&mut self, other: F)

Performs the -= operation. Read more
source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> SubAssign for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
source§

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

source§

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

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

impl<T: DualNum<F>, F: Float, M: Dim, N: Dim> Sum for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

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<T: DualNum<F>, F: Float, M: Dim, N: Dim> Zero for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, U1, M> + Allocator<T, M, M> + Allocator<T, N> + Allocator<T, U1, N> + Allocator<T, N, N> + Allocator<T, M, N>,

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 M: usize, const N: usize> Copy for HyperDualVec<T, F, Const<M>, Const<N>>

source§

impl<T: Eq + DualNum<F>, F: Eq, M: Eq + Dim, N: Eq + Dim> Eq for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

source§

impl<T: DualNum<F>, F, M: Dim, N: Dim> StructuralPartialEq for HyperDualVec<T, F, M, N>
where DefaultAllocator: Allocator<T, M> + Allocator<T, M, N> + Allocator<T, U1, N>,

Auto Trait Implementations§

§

impl<T, F, M, N> !Freeze for HyperDualVec<T, F, M, N>

§

impl<T, F, M, N> !RefUnwindSafe for HyperDualVec<T, F, M, N>

§

impl<T, F, M, N> !Send for HyperDualVec<T, F, M, N>

§

impl<T, F, M, N> !Sync for HyperDualVec<T, F, M, N>

§

impl<T, F, M, N> !Unpin for HyperDualVec<T, F, M, N>

§

impl<T, F, M, N> !UnwindSafe for HyperDualVec<T, F, M, N>

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