pub trait EinsumSpec {
// Required method
fn spec(&self) -> Spec<'_>;
}Expand description
Anything an einsum accepts as its spec argument: str, String,
EinsumNotation, EinsumSubscripts or a Spec. Operations take it
by reference, so "ij,jk->ik", ¬ation and &subscripts all work.
§Examples
use tenferro_einsum::{EinsumNotation, EinsumSpec, Spec};
assert!(matches!("ij->j".spec(), Spec::Text("ij->j")));
let notation = EinsumNotation::parse("ij->j")?;
assert!(matches!(notation.spec(), Spec::Notation(_)));Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".