Skip to main content

C64

Struct C64 

Source
pub struct C64 {
    pub re: f64,
    pub im: f64,
}
Expand description

A plain complex number for tridiag_solve_c and its callers (CORE-R100): Copy, two f64s, the textbook formulas and nothing else (no dependency).

Fields§

§re: f64§im: f64

Implementations§

Source§

impl C64

Source

pub const ZERO: C64

Source

pub const ONE: C64

Source

pub const I: C64

Source

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

Source

pub fn conj(self) -> Self

Source

pub fn norm_sqr(self) -> f64

|z|².

Source

pub fn scale(self, k: f64) -> Self

k·z for real k.

Source

pub fn is_finite(self) -> bool

Whether both parts are finite.

Trait Implementations§

Source§

impl Add for C64

Source§

type Output = C64

The resulting type after applying the + operator.
Source§

fn add(self, o: C64) -> C64

Performs the + operation. Read more
Source§

impl Clone for C64

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for C64

Source§

impl Debug for C64

Source§

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

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

impl Default for C64

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Div for C64

Source§

fn div(self, o: C64) -> C64

a / b = a·conj(b) / |b|²; a zero b gives non-finite parts.

Source§

type Output = C64

The resulting type after applying the / operator.
Source§

impl Mul for C64

Source§

type Output = C64

The resulting type after applying the * operator.
Source§

fn mul(self, o: C64) -> C64

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) -> C64

Performs the unary - operation. Read more
Source§

impl PartialEq for C64

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for C64

Source§

impl Sub for C64

Source§

type Output = C64

The resulting type after applying the - operator.
Source§

fn sub(self, o: C64) -> C64

Performs the - operation. Read more

Auto Trait Implementations§

§

impl Forget for C64

§

impl Freeze for C64

§

impl Move for C64

§

impl RefUnwindSafe for C64

§

impl Send for C64

§

impl Sync for C64

§

impl Unpin for C64

§

impl UnsafeUnpin 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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