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
andim
.
Implementations§
Source§impl<T: Float> Construct<T, T>
impl<T: Float> Construct<T, T>
Sourcepub fn into_num(self) -> NumComplex<T>
pub fn into_num(self) -> NumComplex<T>
Convert into num_complex::Complex
struct.
Sourcepub fn cbrt(self) -> Self
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
.
Sourcepub fn log(self, base: T) -> Self
pub fn log(self, base: T) -> Self
Returns the logarithm of self
with respect to an arbitrary base.
Sourcepub fn asinh(self) -> Self
pub fn asinh(self) -> Self
Computes the principal value of the inverse hyperbolic sine of self
.
Sourcepub fn acosh(self) -> Self
pub fn acosh(self) -> Self
Computes the principal value of the inverse hyperbolic cosine of self
.
Trait Implementations§
Source§impl<T, U> AbsDiffEq for Construct<T, U>
impl<T, U> AbsDiffEq for Construct<T, U>
Source§fn default_epsilon() -> Self::Epsilon
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
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
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq
.Source§impl<T, U> AddAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
impl<T, U> AddAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
Source§fn add_assign(&mut self, other: Construct<T, U>)
fn add_assign(&mut self, other: Construct<T, U>)
Performs the
+=
operation. Read moreSource§impl<T, U> AddAssign<T> for Construct<T, U>where
U: AddAssign<T>,
impl<T, U> AddAssign<T> for Construct<T, U>where
U: AddAssign<T>,
Source§fn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
Performs the
+=
operation. Read moreSource§impl<T, U> AddAssign for Construct<T, U>where
U: AddAssign,
impl<T, U> AddAssign for Construct<T, U>where
U: AddAssign,
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moreSource§impl<T: NumCast + Algebra + Dot<Output = T> + Clone> DerivDir<Construct<T, Construct<T, T>>> for Moebius<Complex<T>>
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>
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: Float, U: NormSqr<Output = T> + Clone> Distribution<Construct<T, U>> for NonZero
impl<T: Float, U: NormSqr<Output = T> + Clone> Distribution<Construct<T, U>> for NonZero
Source§impl<T, U> Distribution<Construct<T, U>> for StandardNormalwhere
StandardNormal: Distribution<U>,
impl<T, U> Distribution<Construct<T, U>> for StandardNormalwhere
StandardNormal: Distribution<U>,
Source§impl<T: Float, U: NormSqr<Output = T> + Div<T, Output = U> + Clone> Distribution<Construct<T, U>> for Unit
impl<T: Float, U: NormSqr<Output = T> + Div<T, Output = U> + Clone> Distribution<Construct<T, U>> for Unit
Source§impl<T, U> DivAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
impl<T, U> DivAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
Source§fn div_assign(&mut self, other: Construct<T, U>)
fn div_assign(&mut self, other: Construct<T, U>)
Performs the
/=
operation. Read moreSource§impl<T, U> DivAssign<T> for Construct<T, U>
impl<T, U> DivAssign<T> for Construct<T, U>
Source§fn div_assign(&mut self, other: T)
fn div_assign(&mut self, other: T)
Performs the
/=
operation. Read moreSource§impl<T, U> DivAssign for Construct<T, U>
impl<T, U> DivAssign for Construct<T, U>
Source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
Performs the
/=
operation. Read moreSource§impl<T, U> MulAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
impl<T, U> MulAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
Source§fn mul_assign(&mut self, other: Construct<T, U>)
fn mul_assign(&mut self, other: Construct<T, U>)
Performs the
*=
operation. Read moreSource§impl<T, U> MulAssign<T> for Construct<T, U>
impl<T, U> MulAssign<T> for Construct<T, U>
Source§fn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
Performs the
*=
operation. Read moreSource§impl<T, U> MulAssign for Construct<T, U>
impl<T, U> MulAssign for Construct<T, U>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moreSource§impl<T: Num + Algebra + Clone, U: Num + Algebra<T> + Clone> Num for Construct<T, U>
Not implemented yet.
impl<T: Num + Algebra + Clone, U: Num + Algebra<T> + Clone> Num for Construct<T, U>
Not implemented yet.
type FromStrRadixErr = ()
Source§fn from_str_radix(
_str: &str,
_radix: u32,
) -> Result<Self, Self::FromStrRadixErr>
fn from_str_radix( _str: &str, _radix: u32, ) -> Result<Self, Self::FromStrRadixErr>
Convert from a string and radix (typically
2..=36
). Read moreSource§impl<T, U> RelativeEq for Construct<T, U>
impl<T, U> RelativeEq for Construct<T, U>
Source§fn default_max_relative() -> Self::Epsilon
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
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
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.
impl<T: Num + Algebra + Clone, U: Num + Algebra<T> + Clone> Rem for Construct<T, U>
Not implemented yet.
Source§impl<T, U> SubAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
impl<T, U> SubAssign<Construct<T, U>> for Construct<T, Construct<T, U>>
Source§fn sub_assign(&mut self, other: Construct<T, U>)
fn sub_assign(&mut self, other: Construct<T, U>)
Performs the
-=
operation. Read moreSource§impl<T, U> SubAssign<T> for Construct<T, U>where
U: SubAssign<T>,
impl<T, U> SubAssign<T> for Construct<T, U>where
U: SubAssign<T>,
Source§fn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
Performs the
-=
operation. Read moreSource§impl<T, U> SubAssign for Construct<T, U>where
U: SubAssign,
impl<T, U> SubAssign for Construct<T, U>where
U: SubAssign,
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreSource§impl<T: Algebra + Clone, U: Algebra<T> + Clone> Transform<Construct<T, Construct<T, U>>> for Moebius<Construct<T, U>>
impl<T: Algebra + Clone, U: Algebra<T> + Clone> Transform<Construct<T, Construct<T, U>>> for Moebius<Construct<T, U>>
Source§impl<T, U> UlpsEq for Construct<T, U>
impl<T, U> UlpsEq for Construct<T, U>
impl<T, U> Algebra<T> for Construct<T, U>
impl<T: Copy, U: Copy> Copy for Construct<T, U>
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>where
U: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, U> Send for Construct<T, U>
impl<T, U> Sync for Construct<T, U>
impl<T, U> Unpin for Construct<T, U>
impl<T, U> UnwindSafe for Construct<T, U>where
U: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more