Algebra

Trait Algebra 

Source
pub trait Algebra {
    type Scalar: Scalar;
}
Expand description

Associates an algebra marker with its scalar type.

This is the minimal algebra marker trait required by the primitive family traits. It provides the scalar type without requiring semiring operations.

Semiring extends Algebra with zero/one/add/mul.

§Examples

use tenferro_algebra::{Algebra, Standard};

fn needs_algebra<A: Algebra>() {}
needs_algebra::<Standard<f64>>();
needs_algebra::<Standard<f32>>();

Required Associated Types§

Source

type Scalar: Scalar

The scalar element type for tensors under this algebra.

Implementors§