c64

Type Alias c64 

Source
pub type c64 = Complex<f64>;
Expand description

Complex<f64>

Aliased Type§

#[repr(C)]
pub struct c64 { pub re: f64, pub im: f64, }

Fields§

§re: f64

Real portion of the complex number

§im: f64

Imaginary portion of the complex number

Trait Implementations§

Source§

impl BitWidthConvertible for c64

Source§

type Width32 = Complex<f32>

The 32-bit width representation of the type.
Source§

type Width64 = Complex<f64>

The 64-bit width representation of the type.
Source§

fn to32(self) -> Self::Width32

Converts the type into its 32-bit width representation.
Source§

fn to64(self) -> Self::Width64

Converts the type into its 64-bit width representation.
Source§

fn from32(width32: Self::Width32) -> Self

Constructs the type from a 32-bit width representation.
Source§

fn from64(width64: Self::Width64) -> Self

Constructs the type from a 64-bit width representation.
Source§

impl ComplexScalar for c64

Source§

type R = f64

The real number type associated with this complex number.
Source§

fn new(real: impl RealScalar, imag: impl RealScalar) -> Self

Create a complex number from real and imaginary parts
Source§

fn from_real(real: impl RealScalar) -> Self

Create a complex number from just the real part (imaginary = 0)
Source§

fn real(&self) -> Self::R

The real component of the complex number.
Source§

fn imag(&self) -> Self::R

The imaginary component of the complex number.
Source§

fn standard_random() -> Self

Generate a random complex number with both real and imaginary parts from standard normal
Source§

fn uniform_random( real_min: Self::R, real_max: Self::R, imag_min: Self::R, imag_max: Self::R, ) -> Self

Generate a random complex number with both parts uniform in given ranges
Source§

fn norm_squared(self) -> Self::R

Calculate the squared norm (|z|²) of the complex number