pub trait ElementOp<T>:
Copy
+ Default
+ 'static {
const IS_IDENTITY: bool = false;
// Required method
fn apply(value: T) -> T;
}Expand description
Trait for element-wise operations applied to strided views.
Generic over the element type T. Identity implements this for any
T: Copy, while Conj, Transpose, and Adjoint require
T: ElementOpApply.
Operations form a group under composition:
compose | Id | Conj | Trans | Adj
---------|------|------|-------|------
Id | Id | Conj | Trans | Adj
Conj | Conj | Id | Adj | Trans
Trans | Trans| Adj | Id | Conj
Adj | Adj | Trans| Conj | IdProvided Associated Constants§
Sourceconst IS_IDENTITY: bool = false
const IS_IDENTITY: bool = false
Whether this operation is the identity (no-op).
Required Methods§
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.