Conjugate

Trait Conjugate 

Source
pub trait Conjugate: Copy {
    // Provided method
    fn conj(self) -> Self { ... }
}
Expand description

Complex conjugation for tensor element types.

Default implementation returns self unchanged, which is correct for real-valued types. Complex types override with actual conjugation.

§Examples

use tenferro_algebra::Conjugate;

// Real types: conj is identity
assert_eq!(3.14_f64.conj(), 3.14_f64);

// Complex types: conj negates imaginary part
use num_complex::Complex64;
let z = Complex64::new(1.0, 2.0);
assert_eq!(z.conj(), Complex64::new(1.0, -2.0));

Provided Methods§

Source

fn conj(self) -> Self

Return the complex conjugate of this value.

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 Conjugate for f32

Source§

impl Conjugate for f64

Source§

impl Conjugate for Complex32

Source§

fn conj(self) -> Self

Source§

impl Conjugate for Complex64

Source§

fn conj(self) -> Self

Implementors§