Trait lowdim::Matrix[][src]

pub trait Matrix<S> where
    S: Integer,
    Self: Clone,
    Self: MatrixOps<S, Self>,
    Self: for<'a> MatrixOps<S, &'a Self>,
    Self: MatrixOps<S, Self::V, Self::V>,
    Self: for<'a> MatrixOps<S, &'a Self::V, Self::V>, 
{ type V: Vector<S>; fn with<F>(f: F) -> Self
    where
        F: Fn(usize, usize) -> S
; fn zero() -> Self { ... }
fn unit() -> Self { ... } }
Expand description

Required traits and operations for matrices.

Associated Types

The corresponding vector type.

Must have the same scalar base type and dimension.

Required methods

Creates a new matrix from a function.

Example
let m = Matrix2d::with(|i, j| i64::try_from(3 * i + j).unwrap());
assert_eq!(Matrix2d::new(0, 1, 3, 4), m);

Provided methods

Creates a zero matrix.

Creates a unit matrix.

Implementors