HasAlgebra

Trait HasAlgebra 

Source
pub trait HasAlgebra {
    type Algebra;
}
Expand description

Maps a scalar type T to its default algebra A.

Enables automatic algebra inference: Tensor<f64>Standard, Tensor<MaxPlus<f64>>MaxPlus (in external crate).

§Implementing for custom types

struct MyScalar(f64);
struct MyAlgebra;

impl HasAlgebra for MyScalar {
    type Algebra = MyAlgebra;
}

Required Associated Types§

Source

type Algebra

The algebra associated with this scalar type.

Implementations on Foreign Types§

Source§

impl HasAlgebra for f32

Source§

impl HasAlgebra for f64

Source§

impl HasAlgebra for Complex32

Source§

impl HasAlgebra for Complex64

Implementors§