Module rulinalg::matrix::slice [] [src]

Traits for matrices operations.

These traits defines operations for structs representing matrices arranged in row-major order.

Implementations are provided for - Matrix: an owned matrix - MatrixSlice: a borrowed immutable block of Matrix - MatrixSliceMut: a borrowed mutable block of Matrix

use rulinalg::matrix::{Matrix, BaseMatrix};

let a = Matrix::new(3,3, (0..9).collect::<Vec<usize>>());

// Manually create our slice - [[4,5],[7,8]].
let mat_slice = a.sub_slice([0,1], 3, 2);

// We can perform arithmetic with mixing owned and borrowed versions
let _new_mat = &mat_slice.transpose() * &a;

Structs

SliceIter

Iterator for matrix.

SliceIterMut

Iterator for mutable matrix.

Traits

BaseMatrix

Trait for immutable matrix structs.

BaseMatrixMut

Trait for mutable matrices.