ElementOpApply

Trait ElementOpApply 

Source
pub trait ElementOpApply: Copy {
    // Provided methods
    fn conj(self) -> Self { ... }
    fn transpose(self) -> Self { ... }
    fn adjoint(self) -> Self { ... }
}
Expand description

Trait for types that support element operations (conj, transpose, adjoint).

Default implementations return self unchanged, so real-valued types (and custom types that don’t need complex operations) can simply write:

impl ElementOpApply for MyType {}

Provided Methods§

Source

fn conj(self) -> Self

Source

fn transpose(self) -> Self

Source

fn adjoint(self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ElementOpApply for f32

Source§

impl ElementOpApply for f64

Source§

impl ElementOpApply for i8

Source§

impl ElementOpApply for i16

Source§

impl ElementOpApply for i32

Source§

impl ElementOpApply for i64

Source§

impl ElementOpApply for i128

Source§

impl ElementOpApply for isize

Source§

impl ElementOpApply for u8

Source§

impl ElementOpApply for u16

Source§

impl ElementOpApply for u32

Source§

impl ElementOpApply for u64

Source§

impl ElementOpApply for u128

Source§

impl ElementOpApply for usize

Source§

impl<T: Num + Copy + Clone + Neg<Output = T>> ElementOpApply for Complex<T>

Source§

fn conj(self) -> Self

Source§

fn transpose(self) -> Self

Source§

fn adjoint(self) -> Self

Implementors§