Struct Construct

Source
pub struct Construct<T, U> { /* private fields */ }
Expand description

Cayley–Dickson construction, a basic building block.

Structure takes two type parameters:

  • The first one, T: a scalar type the algebra is built over.
  • The second one, U: is a type of two components of the construction: re and im.

Implementations§

Source§

impl<T, U> Construct<T, U>

Source

pub fn new(re: U, im: U) -> Self

Create from real and imaginary parts.

Source

pub fn split(self) -> (U, U)

Split by real and imaginary parts.

Source

pub fn re_ref(&self) -> &U

Source

pub fn im_ref(&self) -> &U

Source

pub fn re_mut(&mut self) -> &mut U

Source

pub fn im_mut(&mut self) -> &mut U

Source§

impl<T, U> Construct<T, U>
where U: Clone,

Source

pub fn re(&self) -> U

Source

pub fn im(&self) -> U

Source§

impl<T, U> Construct<T, U>
where Self: Clone + Norm<Output = T> + Div<T, Output = Self>,

Source

pub fn normalize(self) -> Self

Source§

impl<T, U> Construct<T, Construct<T, U>>

Source

pub fn new2(w: U, x: U, y: U, z: U) -> Self

Create from four parts.

Source§

impl<T, U> Construct<T, Construct<T, U>>
where U: Clone, Construct<T, U>: Clone,

Source

pub fn w(&self) -> U

Source

pub fn x(&self) -> U

Source

pub fn y(&self) -> U

Source

pub fn z(&self) -> U

Source§

impl<T, U> Construct<T, Construct<T, U>>

Source

pub fn w_ref(&self) -> &U

Source

pub fn x_ref(&self) -> &U

Source

pub fn y_ref(&self) -> &U

Source

pub fn z_ref(&self) -> &U

Source

pub fn w_mut(&mut self) -> &mut U

Source

pub fn x_mut(&mut self) -> &mut U

Source

pub fn y_mut(&mut self) -> &mut U

Source

pub fn z_mut(&mut self) -> &mut U

Source§

impl<T: Float> Construct<T, T>

Source

pub fn into_num(self) -> NumComplex<T>

Convert into num_complex::Complex struct.

Source

pub fn arg(self) -> T

Calculate the principal Arg of self.

Source

pub fn exp(self) -> Self

Computes e^(self), where e is the base of the natural logarithm.

Source

pub fn ln(self) -> Self

Computes the principal value of natural logarithm of self.

Source

pub fn sqrt(self) -> Self

Computes the principal value of the square root of self.

Source

pub fn cbrt(self) -> Self

Computes the principal value of the cube root of self.

Note that this does not match the usual result for the cube root of negative real numbers. For example, the real cube root of -8 is -2, but the principal complex cube root of -8 is 1 + i√3.

Source

pub fn powu(self, exp: u32) -> Self

Raises self to an unsigned integer power.

Source

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

Raises self to a signed integer power.

Source

pub fn powf(self, exp: T) -> Self

Raises self to a floating point power.

Source

pub fn powc(self, exp: Self) -> Self

Raises self to a complex power.

Source

pub fn log(self, base: T) -> Self

Returns the logarithm of self with respect to an arbitrary base.

Source

pub fn expf(self, base: T) -> Self

Raises a floating point number to the complex power self.

Source

pub fn sin(self) -> Self

Computes the sine of self.

Source

pub fn cos(self) -> Self

Computes the cosine of self.

Source

pub fn tan(self) -> Self

Computes the tangent of self.

Source

pub fn asin(self) -> Self

Computes the principal value of the inverse sine of self.

Source

pub fn acos(self) -> Self

Computes the principal value of the inverse cosine of self.

Source

pub fn atan(self) -> Self

Computes the principal value of the inverse tangent of self.

Source

pub fn sinh(self) -> Self

Computes the hyperbolic sine of self.

Source

pub fn cosh(self) -> Self

Computes the hyperbolic cosine of self.

Source

pub fn tanh(self) -> Self

Computes the hyperbolic tangent of self.

Source

pub fn asinh(self) -> Self

Computes the principal value of the inverse hyperbolic sine of self.

Source

pub fn acosh(self) -> Self

Computes the principal value of the inverse hyperbolic cosine of self.

Source

pub fn atanh(self) -> Self

Computes the principal value of the inverse hyperbolic tangent of self.

Source

pub fn finv(self) -> Self

Returns 1/self using floating-point operations.

Source§

impl<T: Float + Clone> Construct<T, T>
where Self: Norm<Output = T>,

Source

pub fn to_polar(self) -> (T, T)

Convert to polar form.

Source

pub fn from_polar(r: T, theta: T) -> Self

Convert a polar representation into a complex number.

Source§

impl<T: One + Zero> Construct<T, T>

Source

pub fn i() -> Self

Source§

impl<T: One + Zero> Construct<T, Construct<T, T>>

Source

pub fn i() -> Self

Source

pub fn j() -> Self

Source

pub fn k() -> Self

Trait Implementations§

Source§

impl<T, U> AbsDiffEq for Construct<T, U>
where T: AbsDiffEq<Epsilon = T> + Clone, U: AbsDiffEq<Epsilon = T>,

Source§

type Epsilon = T

Used for specifying relative comparisons.
Source§

fn default_epsilon() -> Self::Epsilon

The default tolerance to use when testing values that are close together. Read more
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 abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
Source§

impl<T, U> Add<Construct<T, Construct<T, U>>> for Construct<T, U>
where Construct<T, U>: Add<Output = Construct<T, U>>,

Source§

type Output = Construct<T, Construct<T, U>>

The resulting type after applying the + operator.
Source§

fn add(self, other: Construct<T, Construct<T, U>>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, U> Add<Construct<T, U>> for Construct<T, Construct<T, U>>
where Construct<T, U>: Add<Output = Construct<T, U>>,

Source§

type Output = Construct<T, Construct<T, U>>

The resulting type after applying the + operator.
Source§

fn add(self, other: Construct<T, U>) -> Self::Output

Performs the + operation. Read more
Source§

impl<U> Add<Construct<f32, U>> for f32
where Construct<f32, U>: Add<f32, Output = Construct<f32, U>>,

Workaround for reverse addition.

Source§

type Output = Construct<f32, U>

The resulting type after applying the + operator.
Source§

fn add(self, other: Construct<f32, U>) -> Self::Output

Performs the + operation. Read more
Source§

impl<U> Add<Construct<f64, U>> for f64
where Construct<f64, U>: Add<f64, Output = Construct<f64, U>>,

Workaround for reverse addition.

Source§

type Output = Construct<f64, U>

The resulting type after applying the + operator.
Source§

fn add(self, other: Construct<f64, U>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, U> Add<T> for Construct<T, U>
where U: Add<T, Output = U>,

Source§

type Output = Construct<T, U>

The resulting type after applying the + operator.
Source§

fn add(self, other: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, U> Add for Construct<T, U>
where U: Add<Output = U>,

Source§

type Output = Construct<T, U>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<T, U> AddAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
where Construct<T, U>: AddAssign,

Source§

fn add_assign(&mut self, other: Construct<T, U>)

Performs the += operation. Read more
Source§

impl<T, U> AddAssign<T> for Construct<T, U>
where U: AddAssign<T>,

Source§

fn add_assign(&mut self, other: T)

Performs the += operation. Read more
Source§

impl<T, U> AddAssign for Construct<T, U>
where U: AddAssign,

Source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
Source§

impl<T: Clone, U: Clone> Clone for Construct<T, U>

Source§

fn clone(&self) -> Construct<T, U>

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, U> Conj for Construct<T, U>
where U: Conj + Neg<Output = U>,

Source§

fn conj(self) -> Self

Get conjugate value.
Source§

impl<T: Debug, U> Debug for Construct<T, U>
where Self: Format<T>,

Source§

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

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

impl<T: Algebra + Clone> Deriv<Construct<T, T>> for Moebius<Complex<T>>

Source§

fn deriv(&self, p: Complex<T>) -> Complex<T>

Find the derivative of self at the specified point p.
Source§

impl<T: NumCast + Algebra + Dot<Output = T> + Clone> DerivDir<Construct<T, Construct<T, T>>> for Moebius<Complex<T>>

Source§

fn deriv_dir(&self, p: Quaternion<T>, v: Quaternion<T>) -> Quaternion<T>

Find the directinal derivative of self at the specified point p via the specified direction d.
Source§

impl<T: Display, U> Display for Construct<T, U>
where Self: Format<T>,

Source§

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

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

impl<T: Float, U: NormSqr<Output = T> + Clone> Distribution<Construct<T, U>> for NonZero

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Construct<T, U>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

impl<T, U> Distribution<Construct<T, U>> for StandardNormal

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Construct<T, U>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

impl<T: Float, U: NormSqr<Output = T> + Div<T, Output = U> + Clone> Distribution<Construct<T, U>> for Unit

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Construct<T, U>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

impl<T, U> Div<Construct<T, Construct<T, U>>> for Construct<T, U>
where Construct<T, Self>: Inv<Output = Construct<T, Self>>, Self: Mul<Construct<T, Self>, Output = Construct<T, Self>>,

Source§

type Output = Construct<T, Construct<T, U>>

The resulting type after applying the / operator.
Source§

fn div(self, other: Construct<T, Construct<T, U>>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, U> Div<Construct<T, U>> for Construct<T, Construct<T, U>>
where Construct<T, U>: Div<Output = Construct<T, U>> + Clone,

Source§

type Output = Construct<T, Construct<T, U>>

The resulting type after applying the / operator.
Source§

fn div(self, other: Construct<T, U>) -> Self::Output

Performs the / operation. Read more
Source§

impl<U> Div<Construct<f32, U>> for f32
where Construct<f32, U>: Inv<Output = Construct<f32, U>> + Mul<f32, Output = Construct<f32, U>> + Clone,

Workaround for reverse division.

Source§

type Output = Construct<f32, U>

The resulting type after applying the / operator.
Source§

fn div(self, other: Construct<f32, U>) -> Self::Output

Performs the / operation. Read more
Source§

impl<U> Div<Construct<f64, U>> for f64
where Construct<f64, U>: Inv<Output = Construct<f64, U>> + Mul<f64, Output = Construct<f64, U>> + Clone,

Workaround for reverse division.

Source§

type Output = Construct<f64, U>

The resulting type after applying the / operator.
Source§

fn div(self, other: Construct<f64, U>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, U> Div<T> for Construct<T, U>
where T: Clone, U: Div<T, Output = U>,

Source§

type Output = Construct<T, U>

The resulting type after applying the / operator.
Source§

fn div(self, other: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, U> Div for Construct<T, U>
where Self: Inv<Output = Self> + Mul<Output = Self>,

Source§

type Output = Construct<T, U>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<T, U> DivAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
where Self: Div<Construct<T, U>, Output = Self> + Clone,

Source§

fn div_assign(&mut self, other: Construct<T, U>)

Performs the /= operation. Read more
Source§

impl<T, U> DivAssign<T> for Construct<T, U>
where Self: Clone + Div<T, Output = Self>,

Source§

fn div_assign(&mut self, other: T)

Performs the /= operation. Read more
Source§

impl<T, U> DivAssign for Construct<T, U>
where Self: Clone + Div<Output = Self>,

Source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
Source§

impl<T, U> Dot for Construct<T, U>
where T: Add<Output = T>, U: Dot<Output = T>,

Source§

type Output = T

Dot product output type.
Source§

fn dot(self, other: Self) -> T

Perform dot product.
Source§

impl<T, U> Format<T> for Construct<T, Construct<T, U>>
where Construct<T, U>: Format<T>,

Source§

fn level() -> usize

Source§

fn write_content_debug(&self, f: &mut Formatter<'_>) -> FmtResult
where T: Debug,

Source§

fn write_content_display(&self, f: &mut Formatter<'_>) -> FmtResult
where T: Display,

Source§

fn write_name(f: &mut Formatter<'_>) -> FmtResult

Source§

impl<T> Format<T> for Construct<T, T>

Source§

fn level() -> usize

Source§

fn write_content_debug(&self, f: &mut Formatter<'_>) -> FmtResult
where T: Debug,

Source§

fn write_content_display(&self, f: &mut Formatter<'_>) -> FmtResult
where T: Display,

Source§

fn write_name(f: &mut Formatter<'_>) -> FmtResult

Source§

impl<T, U> Inv for Construct<T, U>
where Self: Clone + Conj + NormSqr<Output = T> + Div<T, Output = Self>,

Source§

type Output = Construct<T, U>

The result after applying the operator.
Source§

fn inv(self) -> Self

Returns the multiplicative inverse of self. Read more
Source§

impl<T, U> Mul<Construct<T, Construct<T, U>>> for Construct<T, U>
where Construct<T, U>: Mul<Output = Construct<T, U>> + Clone,

Source§

type Output = Construct<T, Construct<T, U>>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Construct<T, Construct<T, U>>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U> Mul<Construct<T, U>> for Construct<T, Construct<T, U>>
where Construct<T, U>: Mul<Output = Construct<T, U>> + Clone,

Source§

type Output = Construct<T, Construct<T, U>>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Construct<T, U>) -> Self::Output

Performs the * operation. Read more
Source§

impl<U> Mul<Construct<f32, U>> for f32
where Construct<f32, U>: Mul<f32, Output = Construct<f32, U>>,

Workaround for reverse multiplication.

Source§

type Output = Construct<f32, U>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Construct<f32, U>) -> Self::Output

Performs the * operation. Read more
Source§

impl<U> Mul<Construct<f64, U>> for f64
where Construct<f64, U>: Mul<f64, Output = Construct<f64, U>>,

Workaround for reverse multiplication.

Source§

type Output = Construct<f64, U>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Construct<f64, U>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U> Mul<T> for Construct<T, U>
where T: Clone, U: Mul<T, Output = U>,

Source§

type Output = Construct<T, U>

The resulting type after applying the * operator.
Source§

fn mul(self, other: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U> Mul for Construct<T, U>
where U: Clone + Conj + Mul<Output = U> + Add<Output = U> + Sub<Output = U>,

Source§

type Output = Construct<T, U>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<T, U> MulAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
where Self: Mul<Construct<T, U>, Output = Self> + Clone,

Source§

fn mul_assign(&mut self, other: Construct<T, U>)

Performs the *= operation. Read more
Source§

impl<T, U> MulAssign<T> for Construct<T, U>
where Self: Clone + Mul<T, Output = Self>,

Source§

fn mul_assign(&mut self, other: T)

Performs the *= operation. Read more
Source§

impl<T, U> MulAssign for Construct<T, U>
where Self: Clone + Mul<Output = Self>,

Source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
Source§

impl<T, U> Neg for Construct<T, U>
where U: Neg<Output = U>,

Source§

type Output = Construct<T, U>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl<T, U> Norm for Construct<T, U>
where T: Float, Self: NormSqr<Output = T>,

Source§

type Output = T

Source§

fn norm(self) -> T

Get the norm of the self.
Source§

fn abs(self) -> Self::Output

Alias to norm.
Source§

impl<T, U> NormL1 for Construct<T, U>
where T: Add<Output = T>, U: NormL1<Output = T>,

Source§

type Output = T

Source§

fn norm_l1(self) -> T

Get the L1 norm of the self.
Source§

impl<T, U> NormSqr for Construct<T, U>
where T: Add<Output = T>, U: NormSqr<Output = T>,

Source§

type Output = T

Source§

fn norm_sqr(self) -> T

Get square of the norm of the self.
Source§

fn abs_sqr(self) -> Self::Output

Alias to norm_sqr.
Source§

impl<T: Num + Algebra + Clone, U: Num + Algebra<T> + Clone> Num for Construct<T, U>

Not implemented yet.

Source§

type 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, U> One for Construct<T, U>
where U: Zero + One, Self: Mul<Output = Self>,

Source§

fn one() -> Self

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

fn set_one(&mut self)

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

fn is_one(&self) -> bool
where Self: PartialEq,

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

impl<T: PartialEq, U: PartialEq> PartialEq for Construct<T, U>

Source§

fn eq(&self, other: &Construct<T, U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, U> RelativeEq for Construct<T, U>
where T: RelativeEq<Epsilon = T> + Clone, U: RelativeEq<Epsilon = T>,

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<T: Num + Algebra + Clone, U: Num + Algebra<T> + Clone> Rem for Construct<T, U>

Not implemented yet.

Source§

type Output = Construct<T, U>

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl<T, U> Sub<Construct<T, Construct<T, U>>> for Construct<T, U>
where Construct<T, U>: Sub<Output = Construct<T, U>>,

Source§

type Output = Construct<T, Construct<T, U>>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Construct<T, Construct<T, U>>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, U> Sub<Construct<T, U>> for Construct<T, Construct<T, U>>
where Construct<T, U>: Sub<Output = Construct<T, U>>,

Source§

type Output = Construct<T, Construct<T, U>>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Construct<T, U>) -> Self::Output

Performs the - operation. Read more
Source§

impl<U> Sub<Construct<f32, U>> for f32
where Construct<f32, U>: Neg<Output = Construct<f32, U>> + Add<f32, Output = Construct<f32, U>>,

Workaround for reverse subtraction.

Source§

type Output = Construct<f32, U>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Construct<f32, U>) -> Self::Output

Performs the - operation. Read more
Source§

impl<U> Sub<Construct<f64, U>> for f64
where Construct<f64, U>: Neg<Output = Construct<f64, U>> + Add<f64, Output = Construct<f64, U>>,

Workaround for reverse subtraction.

Source§

type Output = Construct<f64, U>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Construct<f64, U>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, U> Sub<T> for Construct<T, U>
where U: Sub<T, Output = U>,

Source§

type Output = Construct<T, U>

The resulting type after applying the - operator.
Source§

fn sub(self, other: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, U> Sub for Construct<T, U>
where U: Sub<Output = U>,

Source§

type Output = Construct<T, U>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T, U> SubAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
where Construct<T, U>: SubAssign,

Source§

fn sub_assign(&mut self, other: Construct<T, U>)

Performs the -= operation. Read more
Source§

impl<T, U> SubAssign<T> for Construct<T, U>
where U: SubAssign<T>,

Source§

fn sub_assign(&mut self, other: T)

Performs the -= operation. Read more
Source§

impl<T, U> SubAssign for Construct<T, U>
where U: SubAssign,

Source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
Source§

impl<T: Algebra + Clone, U: Algebra<T> + Clone> Transform<Construct<T, Construct<T, U>>> for Moebius<Construct<T, U>>

Source§

fn apply( &self, x: Construct<T, Construct<T, U>>, ) -> Construct<T, Construct<T, U>>

Apply the transformation.
Source§

impl<T, U> UlpsEq for Construct<T, U>
where T: UlpsEq<Epsilon = T> + Clone, U: UlpsEq<Epsilon = T>,

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, U> Zero for Construct<T, U>
where U: Zero,

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, U> Algebra<T> for Construct<T, U>
where T: Algebra + Clone, U: Algebra<T> + Clone,

Source§

impl<T: Copy, U: Copy> Copy for Construct<T, U>

Source§

impl<T, U> StructuralPartialEq for Construct<T, U>

Auto Trait Implementations§

§

impl<T, U> Freeze for Construct<T, U>
where U: Freeze,

§

impl<T, U> RefUnwindSafe for Construct<T, U>

§

impl<T, U> Send for Construct<T, U>
where U: Send, T: Send,

§

impl<T, U> Sync for Construct<T, U>
where U: Sync, T: Sync,

§

impl<T, U> Unpin for Construct<T, U>
where U: Unpin, T: Unpin,

§

impl<T, U> UnwindSafe for Construct<T, U>
where U: UnwindSafe, T: UnwindSafe,

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> 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
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> ToOwned for T
where T: Clone,

Source§

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§

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

Source§

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

Source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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