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

Slices for the Matrix struct.

These slices provide a view into the matrix data. The view must be a contiguous block of the matrix.

use rulinalg::matrix::Matrix;
use rulinalg::matrix::MatrixSlice;

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

// Manually create our slice - [[4,5],[7,8]].
let mat_slice = MatrixSlice::from_matrix(&a, [1,1], 2, 2);

// We can perform arithmetic with slices.
let new_mat = &mat_slice * &mat_slice;

Structs

SliceIter

Iterator for MatrixSlice

SliceIterMut

Iterator for MatrixSliceMut.

Traits

BaseSlice

Trait for Matrix Slices.