Struct c64

Source
pub struct c64 { /* private fields */ }

Implementations§

Source§

impl c64

Source

pub fn new(a: f64, b: f64) -> Self

Creates a new complex number (a + bi)

Source

pub fn conjugate(self) -> Self

Returns the conjugate of the complex number

Source

pub fn mag(self) -> f64

Returns the magnitude (absolute value) of the complex number

Source

pub fn re(self) -> f64

Source

pub fn im(self) -> f64

Source

pub fn arg(self) -> f64

Source

pub fn sqrt(self) -> Self

Source§

impl c64

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const I: Self

Source

pub const NEG_I: Self

Source

pub const EPSILON: Self

Trait Implementations§

Source§

impl Add<c64> for f64

Source§

type Output = c64

The resulting type after applying the + operator.
Source§

fn add(self, other: c64) -> c64

Performs the + operation. Read more
Source§

impl Add<f64> for c64

Source§

type Output = c64

The resulting type after applying the + operator.
Source§

fn add(self, other: f64) -> c64

Performs the + operation. Read more
Source§

impl Add for c64

Source§

type Output = c64

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign for c64

Source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
Source§

impl Clone for c64

Source§

fn clone(&self) -> c64

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 Debug for c64

Source§

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

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

impl Display for c64

Source§

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

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

impl Div<c64> for f64

Source§

type Output = c64

The resulting type after applying the / operator.
Source§

fn div(self, other: c64) -> c64

Performs the / operation. Read more
Source§

impl Div<f64> for c64

Source§

type Output = c64

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> c64

Performs the / operation. Read more
Source§

impl Div for c64

Source§

type Output = c64

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign for c64

Source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
Source§

impl From<(f64, f64)> for c64

Source§

fn from((a, b): (f64, f64)) -> Self

Converts to this type from the input type.
Source§

impl From<c64> for (f64, f64)

Source§

fn from(c: c64) -> Self

Converts to this type from the input type.
Source§

impl From<c64> for f32

Source§

fn from(c: c64) -> Self

Converts to this type from the input type.
Source§

impl From<c64> for f64

Source§

fn from(c: c64) -> Self

Converts to this type from the input type.
Source§

impl From<c64> for i64

Source§

fn from(c: c64) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for c64

Source§

fn from(a: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for c64

Source§

fn from(a: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for c64

Source§

fn from(a: i64) -> Self

Converts to this type from the input type.
Source§

impl IntoC64 for c64

Source§

fn into_c64(self) -> c64

Source§

impl Mul<c64> for f32

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

fn mul(self, other: c64) -> c64

Performs the * operation. Read more
Source§

impl Mul<c64> for f64

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

fn mul(self, other: c64) -> c64

Performs the * operation. Read more
Source§

impl Mul<c64> for i32

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

fn mul(self, other: c64) -> c64

Performs the * operation. Read more
Source§

impl Mul<c64> for i64

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

fn mul(self, other: c64) -> c64

Performs the * operation. Read more
Source§

impl Mul<f32> for c64

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<f64> for c64

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i32> for c64

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i64> for c64

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for c64

Source§

type Output = c64

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign for c64

Source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
Source§

impl Neg for c64

Source§

type Output = c64

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl PartialEq<c64> for f64

Source§

fn eq(&self, other: &c64) -> 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 PartialEq<f64> for c64

Source§

fn eq(&self, other: &f64) -> 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 PartialEq for c64

Source§

fn eq(&self, other: &Self) -> 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 PartialOrd<c64> for f64

Source§

fn partial_cmp(&self, other: &c64) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<f64> for c64

Source§

fn partial_cmp(&self, other: &f64) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd for c64

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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Sub<c64> for f64

Source§

type Output = c64

The resulting type after applying the - operator.
Source§

fn sub(self, other: c64) -> c64

Performs the - operation. Read more
Source§

impl Sub<f64> for c64

Source§

type Output = c64

The resulting type after applying the - operator.
Source§

fn sub(self, other: f64) -> c64

Performs the - operation. Read more
Source§

impl Sub for c64

Source§

type Output = c64

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign for c64

Source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
Source§

impl Sum for c64

Source§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TensorElement for c64

Source§

const EPSILON: Self = c64::EPSILON

Source§

fn zero() -> Self

Returns the additive identity.
Source§

fn one() -> Self

Source§

fn random(min: Self, max: Self) -> Self

Generate a random value between min and max. For types where min and max don’t really apply (e.g. bool) you can provide a custom behavior.
Source§

fn mag(self) -> f64

Source§

fn conjugate(self) -> Self

Source§

impl WeakMul for c64

Source§

fn weak_mul(self, other: f64) -> Self

Source§

impl Copy 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> 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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToComplex for T
where T: IntoC64,

Source§

fn complex(self) -> c64

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<E> ToScalar<E> for E
where E: TensorElement,

Source§

fn scalar<U>(&self) -> Tensor<E, <U as Unit>::Dimension, 1, 1, 1>
where U: Unit,

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