Skip to main content

ComplexScalar

Trait ComplexScalar 

Source
pub trait ComplexScalar: Float {
    type Complex: ComplexField<RealField = Self> + Copy;

    // Required method
    fn complex(re: Self, im: Self) -> Self::Complex;
}
Expand description

Floating-point type with an associated complex scalar type.

This trait is used by complex contour pieces. It connects a real scalar type, such as f64, to the corresponding complex type, such as Complex<f64>.

It also provides a constructor for complex values from real and imaginary parts, avoiding repeated low-level bounds throughout the contour implementation.

Required Associated Types§

Source

type Complex: ComplexField<RealField = Self> + Copy

Required Methods§

Source

fn complex(re: Self, im: Self) -> Self::Complex

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ComplexScalar for f32

Source§

type Complex = Complex<f32>

Source§

fn complex(re: Self, im: Self) -> Self::Complex

Source§

impl ComplexScalar for f64

Source§

type Complex = Complex<f64>

Source§

fn complex(re: Self, im: Self) -> Self::Complex

Implementors§