Struct c64
pub struct c64 {
pub re: f64,
pub im: f64,
}
Expand description
64-bit complex floating point type. See the module-level documentation for more details.
Fields§
§re: f64
Real part.
im: f64
Negated imaginary part.
Implementations§
§impl c64
impl c64
pub fn from_polar(r: f64, theta: f64) -> c64
pub fn from_polar(r: f64, theta: f64) -> c64
Create a complex number from polar coordinates.
pub fn to_num_complex(self) -> Complex<f64>
pub fn to_num_complex(self) -> Complex<f64>
Convert the number to a num_complex::Complex64.
pub fn is_nan(self) -> bool
pub fn is_infinite(self) -> bool
pub fn is_finite(self) -> bool
pub fn is_normal(self) -> bool
pub fn recip(self) -> c64
pub fn powi(self, exp: i32) -> c64
pub fn powu(self, exp: u32) -> c64
pub fn powf(self, exp: f64) -> c64
pub fn powc(self, exp: Complex<f64>) -> c64
pub fn sqrt(self) -> c64
pub fn exp(self) -> c64
pub fn exp2(self) -> c64
pub fn expf(self, base: f64) -> c64
pub fn ln(self) -> c64
pub fn log(self, base: f64) -> c64
pub fn log2(self) -> c64
pub fn log10(self) -> c64
pub fn cbrt(self) -> c64
pub fn sin(self) -> c64
pub fn cos(self) -> c64
pub fn tan(self) -> c64
pub fn asin(self) -> c64
pub fn acos(self) -> c64
pub fn atan(self) -> c64
pub fn sinh(self) -> c64
pub fn cosh(self) -> c64
pub fn tanh(self) -> c64
pub fn asinh(self) -> c64
pub fn acosh(self) -> c64
pub fn atanh(self) -> c64
pub fn abs(self) -> f64
pub fn arg(self) -> f64
Trait Implementations§
§impl AddAssign<c64conj> for c64
impl AddAssign<c64conj> for c64
§fn add_assign(&mut self, rhs: c64conj)
fn add_assign(&mut self, rhs: c64conj)
Performs the
+=
operation. Read more§impl ComplexField for c64
impl ComplexField for c64
type Real = f64
type Simd = Arch
type ScalarSimd = NoSimd
type PortableSimd = Arch
§fn faer_from_f64(value: f64) -> c64
fn faer_from_f64(value: f64) -> c64
Converts
The conversion may be lossy when converting to a type with less precision.
value
from f64
to Self
.The conversion may be lossy when converting to a type with less precision.
§fn faer_scale_real(self, rhs: <c64 as ComplexField>::Real) -> c64
fn faer_scale_real(self, rhs: <c64 as ComplexField>::Real) -> c64
Returns the input, scaled by
rhs
.§fn faer_scale_power_of_two(self, rhs: <c64 as ComplexField>::Real) -> c64
fn faer_scale_power_of_two(self, rhs: <c64 as ComplexField>::Real) -> c64
Returns the input, scaled by
rhs
.§fn faer_score(self) -> <c64 as ComplexField>::Real
fn faer_score(self) -> <c64 as ComplexField>::Real
Returns either the norm or squared norm of the number. Read more
§fn faer_abs2(self) -> <c64 as ComplexField>::Real
fn faer_abs2(self) -> <c64 as ComplexField>::Real
Returns the squared absolute value of
self
.§fn faer_from_real(real: <c64 as ComplexField>::Real) -> c64
fn faer_from_real(real: <c64 as ComplexField>::Real) -> c64
Returns a complex number whose real part is equal to
real
, and a zero imaginary part.§fn faer_real(self) -> <c64 as ComplexField>::Real
fn faer_real(self) -> <c64 as ComplexField>::Real
Returns the real part.
§fn faer_imag(self) -> <c64 as ComplexField>::Real
fn faer_imag(self) -> <c64 as ComplexField>::Real
Returns the imaginary part.
§fn faer_abs(self) -> <c64 as ComplexField>::Real
fn faer_abs(self) -> <c64 as ComplexField>::Real
Returns the absolute value of
self
.fn faer_slice_as_simd<S>(
slice: &[<c64 as Entity>::Unit],
) -> (&[<c64 as Entity>::SimdUnit<S>], &[<c64 as Entity>::Unit])where
S: Simd,
fn faer_slice_as_simd_mut<S>(
slice: &mut [<c64 as Entity>::Unit],
) -> (&mut [<c64 as Entity>::SimdUnit<S>], &mut [<c64 as Entity>::Unit])where
S: Simd,
fn faer_partial_load_last_unit<S>(
simd: S,
slice: &[<c64 as Entity>::Unit],
) -> <c64 as Entity>::SimdUnit<S>where
S: Simd,
fn faer_partial_store_last_unit<S>(
simd: S,
slice: &mut [<c64 as Entity>::Unit],
values: <c64 as Entity>::SimdUnit<S>,
)where
S: Simd,
fn faer_partial_load_unit<S>(
simd: S,
slice: &[<c64 as Entity>::Unit],
) -> <c64 as Entity>::SimdUnit<S>where
S: Simd,
fn faer_partial_store_unit<S>(
simd: S,
slice: &mut [<c64 as Entity>::Unit],
values: <c64 as Entity>::SimdUnit<S>,
)where
S: Simd,
fn faer_simd_splat_unit<S>(
simd: S,
unit: <c64 as Entity>::Unit,
) -> <c64 as Entity>::SimdUnit<S>where
S: Simd,
fn faer_simd_neg<S>(
simd: S,
values: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_conj<S>(
simd: S,
values: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_add<S>(
simd: S,
lhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
rhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_sub<S>(
simd: S,
lhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
rhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_mul<S>(
simd: S,
lhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
rhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_scale_real<S>(
simd: S,
lhs: <<<c64 as ComplexField>::Real as Entity>::Group as ForCopyType>::FaerOfCopy<<<c64 as ComplexField>::Real as Entity>::SimdUnit<S>>,
rhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_conj_mul<S>(
simd: S,
lhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
rhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_mul_adde<S>(
simd: S,
lhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
rhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
acc: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_conj_mul_adde<S>(
simd: S,
lhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
rhs: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
acc: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_reduce_add<S>(
simd: S,
values: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> c64where
S: Simd,
fn faer_simd_abs2_adde<S>(
simd: S,
values: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
acc: <<<c64 as ComplexField>::Real as Entity>::Group as ForCopyType>::FaerOfCopy<<<c64 as ComplexField>::Real as Entity>::SimdUnit<S>>,
) -> <<<c64 as ComplexField>::Real as Entity>::Group as ForCopyType>::FaerOfCopy<<<c64 as ComplexField>::Real as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_abs2<S>(
simd: S,
values: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<<c64 as ComplexField>::Real as Entity>::Group as ForCopyType>::FaerOfCopy<<<c64 as ComplexField>::Real as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_score<S>(
simd: S,
values: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
) -> <<<c64 as ComplexField>::Real as Entity>::Group as ForCopyType>::FaerOfCopy<<<c64 as ComplexField>::Real as Entity>::SimdUnit<S>>where
S: Simd,
fn faer_simd_scalar_mul<S>(simd: S, lhs: c64, rhs: c64) -> c64where
S: Simd,
fn faer_simd_scalar_conj_mul<S>(simd: S, lhs: c64, rhs: c64) -> c64where
S: Simd,
fn faer_simd_scalar_mul_adde<S>(simd: S, lhs: c64, rhs: c64, acc: c64) -> c64where
S: Simd,
fn faer_simd_scalar_conj_mul_adde<S>(
simd: S,
lhs: c64,
rhs: c64,
acc: c64,
) -> c64where
S: Simd,
fn faer_align_offset<S>(
simd: S,
ptr: *const <c64 as Entity>::Unit,
len: usize,
) -> Offset<<c64 as Entity>::SimdMask<S>>where
S: Simd,
fn faer_slice_as_aligned_simd<S>(
simd: S,
slice: &[<c64 as Entity>::Unit],
offset: Offset<<c64 as Entity>::SimdMask<S>>,
) -> (<c64 as Entity>::PrefixUnit<'_, S>, &[<c64 as Entity>::SimdUnit<S>], <c64 as Entity>::SuffixUnit<'_, S>)where
S: Simd,
fn faer_slice_as_aligned_simd_mut<S>(
simd: S,
slice: &mut [<c64 as Entity>::Unit],
offset: Offset<<c64 as Entity>::SimdMask<S>>,
) -> (<c64 as Entity>::PrefixMutUnit<'_, S>, &mut [<c64 as Entity>::SimdUnit<S>], <c64 as Entity>::SuffixMutUnit<'_, S>)where
S: Simd,
fn faer_simd_rotate_left<S>(
simd: S,
values: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>,
amount: usize,
) -> <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<<c64 as Entity>::SimdUnit<S>>where
S: Simd,
§fn faer_is_nan(&self) -> bool
fn faer_is_nan(&self) -> bool
Returns true if
self
is a NaN value, or false otherwise.§fn faer_is_finite(&self) -> bool
fn faer_is_finite(&self) -> bool
Returns true if
self
is a NaN value, or false otherwise.fn faer_partial_load<S>(
simd: S,
slice: <Self::Group as ForType>::FaerOf<&[Self::Unit]>,
) -> <Self::Group as ForCopyType>::FaerOfCopy<Self::SimdUnit<S>>where
S: Simd,
fn faer_partial_store<S>(
simd: S,
slice: <Self::Group as ForType>::FaerOf<&mut [Self::Unit]>,
values: <Self::Group as ForCopyType>::FaerOfCopy<Self::SimdUnit<S>>,
)where
S: Simd,
fn faer_partial_load_last<S>(
simd: S,
slice: <Self::Group as ForType>::FaerOf<&[Self::Unit]>,
) -> <Self::Group as ForCopyType>::FaerOfCopy<Self::SimdUnit<S>>where
S: Simd,
fn faer_partial_store_last<S>(
simd: S,
slice: <Self::Group as ForType>::FaerOf<&mut [Self::Unit]>,
values: <Self::Group as ForCopyType>::FaerOfCopy<Self::SimdUnit<S>>,
)where
S: Simd,
fn faer_simd_splat<S>(
simd: S,
value: Self,
) -> <Self::Group as ForCopyType>::FaerOfCopy<Self::SimdUnit<S>>where
S: Simd,
§impl Conjugate for c64
impl Conjugate for c64
§type Conj = c64conj
type Conj = c64conj
Must have the same layout as
Self
, and Conj::Unit
must have the same layout as Unit
.§type Canonical = c64
type Canonical = c64
Must have the same layout as
Self
, and Canonical::Unit
must have the same layout as
Unit
.§fn canonicalize(self) -> <c64 as Conjugate>::Canonical
fn canonicalize(self) -> <c64 as Conjugate>::Canonical
Performs the implicit conjugation operation on the given value, returning the canonical
form.
§impl DivAssign<c64conj> for c64
impl DivAssign<c64conj> for c64
§fn div_assign(&mut self, rhs: c64conj)
fn div_assign(&mut self, rhs: c64conj)
Performs the
/=
operation. Read more§impl Entity for c64
impl Entity for c64
const N_COMPONENTS: usize = 1usize
const UNIT: <<c64 as Entity>::Group as ForCopyType>::FaerOfCopy<()> = ()
type Unit = c64
type Index = u64
type SimdUnit<S: Simd> = <S as Simd>::c64s
type SimdMask<S: Simd> = <S as Simd>::m64s
type SimdIndex<S: Simd> = <S as Simd>::u64s
type Group = IdentityGroup
type Iter<I: Iterator> = I
type PrefixUnit<'a, S: Simd> = Prefix<'a, Complex<f64>, S, <S as Simd>::m64s>
type SuffixUnit<'a, S: Simd> = Suffix<'a, Complex<f64>, S, <S as Simd>::m64s>
type PrefixMutUnit<'a, S: Simd> = PrefixMut<'a, Complex<f64>, S, <S as Simd>::m64s>
type SuffixMutUnit<'a, S: Simd> = SuffixMut<'a, Complex<f64>, S, <S as Simd>::m64s>
fn faer_first<T>(group: <<c64 as Entity>::Group as ForType>::FaerOf<T>) -> T
fn faer_from_units( group: <<c64 as Entity>::Group as ForType>::FaerOf<<c64 as Entity>::Unit>, ) -> c64
fn faer_into_units( self, ) -> <<c64 as Entity>::Group as ForType>::FaerOf<<c64 as Entity>::Unit>
fn faer_as_ref<T>( group: &<<c64 as Entity>::Group as ForType>::FaerOf<T>, ) -> <<c64 as Entity>::Group as ForType>::FaerOf<&T>
fn faer_as_mut<T>( group: &mut <<c64 as Entity>::Group as ForType>::FaerOf<T>, ) -> <<c64 as Entity>::Group as ForType>::FaerOf<&mut T>
fn faer_as_ptr<T>( group: *mut <<c64 as Entity>::Group as ForType>::FaerOf<T>, ) -> <<c64 as Entity>::Group as ForType>::FaerOf<*mut T>
fn faer_map_impl<T, U>( group: <<c64 as Entity>::Group as ForType>::FaerOf<T>, f: &mut impl FnMut(T) -> U, ) -> <<c64 as Entity>::Group as ForType>::FaerOf<U>
fn faer_map_with_context<Ctx, T, U>( ctx: Ctx, group: <<c64 as Entity>::Group as ForType>::FaerOf<T>, f: &mut impl FnMut(Ctx, T) -> (Ctx, U), ) -> (Ctx, <<c64 as Entity>::Group as ForType>::FaerOf<U>)
fn faer_zip<T, U>( first: <<c64 as Entity>::Group as ForType>::FaerOf<T>, second: <<c64 as Entity>::Group as ForType>::FaerOf<U>, ) -> <<c64 as Entity>::Group as ForType>::FaerOf<(T, U)>
fn faer_unzip<T, U>( zipped: <<c64 as Entity>::Group as ForType>::FaerOf<(T, U)>, ) -> (<<c64 as Entity>::Group as ForType>::FaerOf<T>, <<c64 as Entity>::Group as ForType>::FaerOf<U>)
fn faer_into_iter<I>(
iter: <<c64 as Entity>::Group as ForType>::FaerOf<I>,
) -> <c64 as Entity>::Iter<<I as IntoIterator>::IntoIter>where
I: IntoIterator,
fn faer_map<T, U>( group: <Self::Group as ForType>::FaerOf<T>, f: impl FnMut(T) -> U, ) -> <Self::Group as ForType>::FaerOf<U>
fn faer_unzip2<T>( zipped: <Self::Group as ForType>::FaerOf<[T; 2]>, ) -> [<Self::Group as ForType>::FaerOf<T>; 2]
fn faer_unzip4<T>( zipped: <Self::Group as ForType>::FaerOf<[T; 4]>, ) -> [<Self::Group as ForType>::FaerOf<T>; 4]
fn faer_unzip8<T>( zipped: <Self::Group as ForType>::FaerOf<[T; 8]>, ) -> [<Self::Group as ForType>::FaerOf<T>; 8]
fn faer_as_arrays<const N: usize, T>( group: <Self::Group as ForType>::FaerOf<&[T]>, ) -> (<Self::Group as ForType>::FaerOf<&[[T; N]]>, <Self::Group as ForType>::FaerOf<&[T]>)
fn faer_as_arrays_mut<const N: usize, T>( group: <Self::Group as ForType>::FaerOf<&mut [T]>, ) -> (<Self::Group as ForType>::FaerOf<&mut [[T; N]]>, <Self::Group as ForType>::FaerOf<&mut [T]>)
fn faer_deref<T>(
group: <Self::Group as ForType>::FaerOf<&T>,
) -> <Self::Group as ForType>::FaerOf<T>where
T: Copy,
fn faer_rb<'short, T>(
value: <Self::Group as ForType>::FaerOf<&'short T>,
) -> <Self::Group as ForType>::FaerOf<<T as Reborrow<'short>>::Target>where
T: Reborrow<'short>,
fn faer_rb_mut<'short, T>(
value: <Self::Group as ForType>::FaerOf<&'short mut T>,
) -> <Self::Group as ForType>::FaerOf<<T as ReborrowMut<'short>>::Target>where
T: ReborrowMut<'short>,
fn faer_into_const<T>(
value: <Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<<T as IntoConst>::Target>where
T: IntoConst,
fn faer_copy<T>(
x: &<Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<T>where
T: Copy,
§impl MulAssign<c64conj> for c64
impl MulAssign<c64conj> for c64
§fn mul_assign(&mut self, rhs: c64conj)
fn mul_assign(&mut self, rhs: c64conj)
Performs the
*=
operation. Read more§impl Num for c64
impl Num for c64
type FromStrRadixErr = ParseComplexError<<f64 as Num>::FromStrRadixErr>
§fn from_str_radix(
str: &str,
radix: u32,
) -> Result<c64, <c64 as Num>::FromStrRadixErr>
fn from_str_radix( str: &str, radix: u32, ) -> Result<c64, <c64 as Num>::FromStrRadixErr>
Convert from a string and radix (typically
2..=36
). Read more§impl RemAssign<c64conj> for c64
impl RemAssign<c64conj> for c64
§fn rem_assign(&mut self, rhs: c64conj)
fn rem_assign(&mut self, rhs: c64conj)
Performs the
%=
operation. Read more§impl SubAssign<c64conj> for c64
impl SubAssign<c64conj> for c64
§fn sub_assign(&mut self, rhs: c64conj)
fn sub_assign(&mut self, rhs: c64conj)
Performs the
-=
operation. Read moreimpl Copy for c64
impl Pod for c64
impl StructuralPartialEq for c64
Auto Trait Implementations§
impl Freeze for c64
impl RefUnwindSafe for c64
impl Send for c64
impl Sync for c64
impl Unpin for c64
impl UnwindSafe for c64
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more