[−][src]Struct rulinalg::matrix::MatrixSlice
A MatrixSlice
This struct provides a slice into a matrix.
The struct contains the upper left point of the slice and the width and height of the slice.
Methods
impl<'a, T> MatrixSlice<'a, T>[src]
pub fn from_matrix(
mat: &'a Matrix<T>,
start: [usize; 2],
rows: usize,
cols: usize
) -> MatrixSlice<T>[src]
mat: &'a Matrix<T>,
start: [usize; 2],
rows: usize,
cols: usize
) -> MatrixSlice<T>
Produce a MatrixSlice from a Matrix
Examples
use rulinalg::matrix::{Matrix, MatrixSlice}; let a = Matrix::new(3,3, (0..9).collect::<Vec<usize>>()); let slice = MatrixSlice::from_matrix(&a, [1,1], 2, 2);
pub unsafe fn from_raw_parts(
ptr: *const T,
rows: usize,
cols: usize,
row_stride: usize
) -> MatrixSlice<'a, T>[src]
ptr: *const T,
rows: usize,
cols: usize,
row_stride: usize
) -> MatrixSlice<'a, T>
Creates a MatrixSlice from raw parts.
Examples
use rulinalg::matrix::MatrixSlice; let mut a = vec![4.0; 16]; unsafe { // Create a matrix slice with 3 rows, and 3 cols // The row stride of 4 specifies the distance between the start of each row in the data. let b = MatrixSlice::from_raw_parts(a.as_ptr(), 3, 3, 4); }
Safety
The pointer must be followed by a contiguous slice of data larger than row_stride * rows.
If not then other operations will produce undefined behaviour.
Additionally cols should be less than the row_stride. It is possible to use this
function safely whilst violating this condition. So long as
max(cols, row_stride) * rows is less than the data size.
Trait Implementations
impl<'a, T> BaseMatrix<T> for MatrixSlice<'a, T>[src]
fn rows(&self) -> usize[src]
fn cols(&self) -> usize[src]
fn row_stride(&self) -> usize[src]
fn as_ptr(&self) -> *const T[src]
fn is_empty(&self) -> bool[src]
fn as_slice(&self) -> MatrixSlice<T>[src]
unsafe fn get_unchecked(&self, index: [usize; 2]) -> &T[src]
fn col(&self, index: usize) -> Column<T>[src]
unsafe fn col_unchecked(&self, index: usize) -> Column<T>[src]
fn row(&self, index: usize) -> Row<T>[src]
unsafe fn row_unchecked(&self, index: usize) -> Row<T>[src]
ⓘImportant traits for SliceIter<'a, T>fn iter<'a>(&self) -> SliceIter<'a, T> where
T: 'a, [src]
T: 'a,
ⓘImportant traits for Cols<'a, T>fn col_iter(&self) -> Cols<T>[src]
ⓘImportant traits for Rows<'a, T>fn row_iter(&self) -> Rows<T>[src]
ⓘImportant traits for Diagonal<'a, T, M>fn diag_iter(&self, k: DiagOffset) -> Diagonal<T, Self>[src]
fn sum_rows(&self) -> Vector<T> where
T: Copy + Zero + Add<T, Output = T>, [src]
T: Copy + Zero + Add<T, Output = T>,
fn sum_cols(&self) -> Vector<T> where
T: Copy + Zero + Add<T, Output = T>, [src]
T: Copy + Zero + Add<T, Output = T>,
fn norm<N: MatrixNorm<T, Self>>(&self, norm: N) -> T where
T: Float, [src]
T: Float,
fn metric<'a, 'b, B, M>(&'a self, mat: &'b B, metric: M) -> T where
B: 'b + BaseMatrix<T>,
M: MatrixMetric<'a, 'b, T, Self, B>, [src]
B: 'b + BaseMatrix<T>,
M: MatrixMetric<'a, 'b, T, Self, B>,
fn sum(&self) -> T where
T: Copy + Zero + Add<T, Output = T>, [src]
T: Copy + Zero + Add<T, Output = T>,
fn min(&self, axis: Axes) -> Vector<T> where
T: Copy + PartialOrd, [src]
T: Copy + PartialOrd,
fn max(&self, axis: Axes) -> Vector<T> where
T: Copy + PartialOrd, [src]
T: Copy + PartialOrd,
fn into_matrix(self) -> Matrix<T> where
T: Copy, [src]
T: Copy,
fn select_rows<'a, I>(&self, rows: I) -> Matrix<T> where
T: Copy,
I: IntoIterator<Item = &'a usize>,
I::IntoIter: ExactSizeIterator + Clone, [src]
T: Copy,
I: IntoIterator<Item = &'a usize>,
I::IntoIter: ExactSizeIterator + Clone,
fn select_cols<'a, I>(&self, cols: I) -> Matrix<T> where
T: Copy,
I: IntoIterator<Item = &'a usize>,
I::IntoIter: ExactSizeIterator + Clone, [src]
T: Copy,
I: IntoIterator<Item = &'a usize>,
I::IntoIter: ExactSizeIterator + Clone,
fn elemul(&self, m: &Self) -> Matrix<T> where
T: Copy + Mul<T, Output = T>, [src]
T: Copy + Mul<T, Output = T>,
fn elediv(&self, m: &Self) -> Matrix<T> where
T: Copy + Div<T, Output = T>, [src]
T: Copy + Div<T, Output = T>,
fn select(&self, rows: &[usize], cols: &[usize]) -> Matrix<T> where
T: Copy, [src]
T: Copy,
fn hcat<S>(&self, m: &S) -> Matrix<T> where
T: Copy,
S: BaseMatrix<T>, [src]
T: Copy,
S: BaseMatrix<T>,
fn vcat<S>(&self, m: &S) -> Matrix<T> where
T: Copy,
S: BaseMatrix<T>, [src]
T: Copy,
S: BaseMatrix<T>,
ⓘImportant traits for Diagonal<'a, T, M>fn diag(&self) -> Diagonal<T, Self>[src]
fn transpose(&self) -> Matrix<T> where
T: Copy, [src]
T: Copy,
fn is_diag(&self) -> bool where
T: Zero + PartialEq, [src]
T: Zero + PartialEq,
fn solve_u_triangular(&self, y: Vector<T>) -> Result<Vector<T>, Error> where
T: Any + Float, [src]
T: Any + Float,
fn solve_l_triangular(&self, y: Vector<T>) -> Result<Vector<T>, Error> where
T: Any + Float, [src]
T: Any + Float,
fn split_at(&self, mid: usize, axis: Axes) -> (MatrixSlice<T>, MatrixSlice<T>)[src]
fn sub_slice<'a>(
&self,
start: [usize; 2],
rows: usize,
cols: usize
) -> MatrixSlice<'a, T> where
T: 'a, [src]
&self,
start: [usize; 2],
rows: usize,
cols: usize
) -> MatrixSlice<'a, T> where
T: 'a,
impl<'a, T: Clone + 'a> Clone for MatrixSlice<'a, T>[src]
fn clone(&self) -> MatrixSlice<'a, T>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'a, T> IntoIterator for MatrixSlice<'a, T>[src]
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = SliceIter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a, T> IntoIterator for &'a MatrixSlice<'a, T>[src]
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = SliceIter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a, T> IntoIterator for &'a mut MatrixSlice<'a, T>[src]
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = SliceIter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a, T: Copy> From<MatrixSlice<'a, T>> for Matrix<T>[src]
fn from(slice: MatrixSlice<'a, T>) -> Self[src]
impl<'a, T: Copy + 'a> Copy for MatrixSlice<'a, T>[src]
impl<'a, T> Add<T> for MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Scalar addition with matrix slice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, f: T) -> Matrix<T>[src]
impl<'a, 'b, T> Add<&'b T> for MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Scalar addition with matrix slice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, f: &T) -> Matrix<T>[src]
impl<'a, 'b, T> Add<T> for &'b MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Scalar addition with matrix slice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, f: T) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<&'c T> for &'b MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Scalar addition with matrix slice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, f: &T) -> Matrix<T>[src]
impl<'a, 'b, T> Add<MatrixSlice<'b, T>> for MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<MatrixSlice<'b, T>> for &'c MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<&'c MatrixSlice<'b, T>> for MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Add<&'d MatrixSlice<'b, T>> for &'c MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Add<MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<MatrixSlice<'b, T>> for &'c MatrixSliceMut<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<&'c MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Add<&'d MatrixSlice<'b, T>> for &'c MatrixSliceMut<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Add<MatrixSliceMut<'b, T>> for MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<MatrixSliceMut<'b, T>> for &'c MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<&'c MatrixSliceMut<'b, T>> for MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: &MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Add<&'d MatrixSliceMut<'b, T>> for &'c MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition between the slices.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: &MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, T> Add<Matrix<T>> for MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise
addition
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, m: Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Add<Matrix<T>> for &'b MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise
addition
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, m: Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Add<&'b Matrix<T>> for MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise
addition
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, m: &Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<&'c Matrix<T>> for &'b MatrixSlice<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise
addition
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, m: &Matrix<T>) -> Matrix<T>[src]
impl<'a, T> Add<MatrixSlice<'a, T>> for Matrix<T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise
addition
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Add<MatrixSlice<'a, T>> for &'b Matrix<T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise
addition
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Add<&'b MatrixSlice<'a, T>> for Matrix<T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise
addition
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Add<&'c MatrixSlice<'a, T>> for &'b Matrix<T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise
addition
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the + operator.
fn add(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, T> Sub<T> for MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Scalar subtraction with matrix slice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, f: T) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<&'b T> for MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Scalar subtraction with matrix slice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, f: &T) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<T> for &'b MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Scalar subtraction with matrix slice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, f: T) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<&'c T> for &'b MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Scalar subtraction with matrix slice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, f: &T) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<MatrixSlice<'b, T>> for MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<MatrixSlice<'b, T>> for &'c MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<&'c MatrixSlice<'b, T>> for MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Sub<&'d MatrixSlice<'b, T>> for &'c MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<MatrixSlice<'b, T>> for &'c MatrixSliceMut<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<&'c MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Sub<&'d MatrixSlice<'b, T>> for &'c MatrixSliceMut<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<MatrixSliceMut<'b, T>> for MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<MatrixSliceMut<'b, T>> for &'c MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<&'c MatrixSliceMut<'b, T>> for MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: &MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Sub<&'d MatrixSliceMut<'b, T>> for &'c MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction between the slices.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: &MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, T> Sub<Matrix<T>> for MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise
subtraction
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, m: Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<Matrix<T>> for &'b MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise
subtraction
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, m: Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<&'b Matrix<T>> for MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise
subtraction
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, m: &Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<&'c Matrix<T>> for &'b MatrixSlice<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise
subtraction
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, m: &Matrix<T>) -> Matrix<T>[src]
impl<'a, T> Sub<MatrixSlice<'a, T>> for Matrix<T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise
subtraction
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<MatrixSlice<'a, T>> for &'b Matrix<T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise
subtraction
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Sub<&'b MatrixSlice<'a, T>> for Matrix<T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise
subtraction
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Sub<&'c MatrixSlice<'a, T>> for &'b Matrix<T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise
subtraction
between Matrix and MatrixSlice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn sub(self, s: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, T> Mul<T> for MatrixSlice<'a, T> where
T: Copy + Mul<T, Output = T>, [src]
T: Copy + Mul<T, Output = T>,
Scalar multiplication with matrix slice.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, f: T) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<&'b T> for MatrixSlice<'a, T> where
T: Copy + Mul<T, Output = T>, [src]
T: Copy + Mul<T, Output = T>,
Scalar multiplication with matrix slice.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, f: &T) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<T> for &'b MatrixSlice<'a, T> where
T: Copy + Mul<T, Output = T>, [src]
T: Copy + Mul<T, Output = T>,
Scalar multiplication with matrix slice.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, f: T) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<&'c T> for &'b MatrixSlice<'a, T> where
T: Copy + Mul<T, Output = T>, [src]
T: Copy + Mul<T, Output = T>,
Scalar multiplication with matrix slice.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, f: &T) -> Matrix<T>[src]
impl<'a, T> Mul<MatrixSlice<'a, T>> for Matrix<T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<&'b MatrixSlice<'a, T>> for Matrix<T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<MatrixSlice<'a, T>> for &'b Matrix<T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<&'c MatrixSlice<'a, T>> for &'b Matrix<T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, T> Mul<Matrix<T>> for MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<&'b Matrix<T>> for MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<Matrix<T>> for &'b MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<&'c Matrix<T>> for &'b MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &Matrix<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<MatrixSlice<'b, T>> for MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<&'c MatrixSlice<'b, T>> for MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<MatrixSlice<'b, T>> for &'c MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Mul<&'d MatrixSlice<'b, T>> for &'c MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<MatrixSliceMut<'b, T>> for MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<&'c MatrixSliceMut<'b, T>> for MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<MatrixSliceMut<'b, T>> for &'c MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Mul<&'d MatrixSliceMut<'b, T>> for &'c MatrixSlice<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &MatrixSliceMut<T>) -> Matrix<T>[src]
impl<'a, 'b, T> Mul<MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<&'c MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Mul<MatrixSlice<'b, T>> for &'c MatrixSliceMut<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'b, 'c, 'd, T> Mul<&'d MatrixSlice<'b, T>> for &'c MatrixSliceMut<'a, T> where
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>, [src]
T: Any + Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>,
Multiplies two matrices together.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, m: &MatrixSlice<T>) -> Matrix<T>[src]
impl<'a, 'm, T> Mul<&'a MatrixSlice<'m, T>> for PermutationMatrix<T> where
T: Zero + Clone, [src]
T: Zero + Clone,
Left-multiply a matrix by a permutation matrix.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, rhs: &'a MatrixSlice<'m, T>) -> Matrix<T>[src]
impl<'a, 'b, 'm, T> Mul<&'a MatrixSlice<'m, T>> for &'b PermutationMatrix<T> where
T: Zero + Clone, [src]
T: Zero + Clone,
Left-multiply a matrix by a permutation matrix.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, rhs: &'a MatrixSlice<'m, T>) -> Matrix<T>[src]
impl<'a, 'm, T> Mul<MatrixSlice<'m, T>> for PermutationMatrix<T> where
T: Zero + Clone, [src]
T: Zero + Clone,
Left-multiply a matrix by a permutation matrix.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, rhs: MatrixSlice<'m, T>) -> Matrix<T>[src]
impl<'a, 'b, 'm, T> Mul<MatrixSlice<'m, T>> for &'b PermutationMatrix<T> where
T: Zero + Clone, [src]
T: Zero + Clone,
Left-multiply a matrix by a permutation matrix.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, rhs: MatrixSlice<'m, T>) -> Matrix<T>[src]
impl<'a, 'm, T> Mul<PermutationMatrix<T>> for &'a MatrixSlice<'m, T> where
T: Zero + Clone, [src]
T: Zero + Clone,
Right-multiply a matrix by a permutation matrix.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, rhs: PermutationMatrix<T>) -> Matrix<T>[src]
impl<'a, 'b, 'm, T> Mul<&'b PermutationMatrix<T>> for &'a MatrixSlice<'m, T> where
T: Zero + Clone, [src]
T: Zero + Clone,
Right-multiply a matrix by a permutation matrix.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, rhs: &'b PermutationMatrix<T>) -> Matrix<T>[src]
impl<'a, 'm, T> Mul<PermutationMatrix<T>> for MatrixSlice<'m, T> where
T: Zero + Clone, [src]
T: Zero + Clone,
Right-multiply a matrix by a permutation matrix.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, rhs: PermutationMatrix<T>) -> Matrix<T>[src]
impl<'a, 'b, 'm, T> Mul<&'b PermutationMatrix<T>> for MatrixSlice<'m, T> where
T: Zero + Clone, [src]
T: Zero + Clone,
Right-multiply a matrix by a permutation matrix.
type Output = Matrix<T>
The resulting type after applying the * operator.
fn mul(self, rhs: &'b PermutationMatrix<T>) -> Matrix<T>[src]
impl<'a, T> Div<T> for MatrixSlice<'a, T> where
T: Copy + Div<T, Output = T>, [src]
T: Copy + Div<T, Output = T>,
Scalar division with matrix slice.
type Output = Matrix<T>
The resulting type after applying the / operator.
fn div(self, f: T) -> Matrix<T>[src]
impl<'a, 'b, T> Div<&'b T> for MatrixSlice<'a, T> where
T: Copy + Div<T, Output = T>, [src]
T: Copy + Div<T, Output = T>,
Scalar division with matrix slice.
type Output = Matrix<T>
The resulting type after applying the / operator.
fn div(self, f: &T) -> Matrix<T>[src]
impl<'a, 'b, T> Div<T> for &'b MatrixSlice<'a, T> where
T: Copy + Div<T, Output = T>, [src]
T: Copy + Div<T, Output = T>,
Scalar division with matrix slice.
type Output = Matrix<T>
The resulting type after applying the / operator.
fn div(self, f: T) -> Matrix<T>[src]
impl<'a, 'b, 'c, T> Div<&'c T> for &'b MatrixSlice<'a, T> where
T: Copy + Div<T, Output = T>, [src]
T: Copy + Div<T, Output = T>,
Scalar division with matrix slice.
type Output = Matrix<T>
The resulting type after applying the / operator.
fn div(self, f: &T) -> Matrix<T>[src]
impl<'a, T> Neg for MatrixSlice<'a, T> where
T: Neg<Output = T> + Copy, [src]
T: Neg<Output = T> + Copy,
Gets negative of matrix slice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn neg(self) -> Matrix<T>[src]
impl<'a, 'b, T> Neg for &'b MatrixSlice<'a, T> where
T: Neg<Output = T> + Copy, [src]
T: Neg<Output = T> + Copy,
Gets negative of matrix slice.
type Output = Matrix<T>
The resulting type after applying the - operator.
fn neg(self) -> Matrix<T>[src]
impl<'a, 'b, T> AddAssign<MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition assignment between two matrices.
fn add_assign(&mut self, _rhs: MatrixSlice<T>)[src]
impl<'a, 'b, 'c, T> AddAssign<&'c MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition assignment between two matrices.
fn add_assign(&mut self, _rhs: &MatrixSlice<T>)[src]
impl<'a, T> AddAssign<MatrixSlice<'a, T>> for Matrix<T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition assignment between two matrices.
fn add_assign(&mut self, _rhs: MatrixSlice<T>)[src]
impl<'a, 'b, T> AddAssign<&'b MatrixSlice<'a, T>> for Matrix<T> where
T: Copy + Add<T, Output = T>, [src]
T: Copy + Add<T, Output = T>,
Performs elementwise addition assignment between two matrices.
fn add_assign(&mut self, _rhs: &MatrixSlice<T>)[src]
impl<'a, 'b, T> SubAssign<MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction assignment between two matrices.
fn sub_assign(&mut self, _rhs: MatrixSlice<T>)[src]
impl<'a, 'b, 'c, T> SubAssign<&'c MatrixSlice<'b, T>> for MatrixSliceMut<'a, T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction assignment between two matrices.
fn sub_assign(&mut self, _rhs: &MatrixSlice<T>)[src]
impl<'a, T> SubAssign<MatrixSlice<'a, T>> for Matrix<T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction assignment between two matrices.
fn sub_assign(&mut self, _rhs: MatrixSlice<T>)[src]
impl<'a, 'b, T> SubAssign<&'b MatrixSlice<'a, T>> for Matrix<T> where
T: Copy + Sub<T, Output = T>, [src]
T: Copy + Sub<T, Output = T>,
Performs elementwise subtraction assignment between two matrices.
fn sub_assign(&mut self, _rhs: &MatrixSlice<T>)[src]
impl<'a, T> Index<[usize; 2]> for MatrixSlice<'a, T>[src]
Indexes matrix slice. Takes row index first then column.
impl<'a, T: Debug + 'a> Debug for MatrixSlice<'a, T>[src]
Auto Trait Implementations
impl<'a, T> !Sync for MatrixSlice<'a, T>
impl<'a, T> !Send for MatrixSlice<'a, T>
impl<'a, T> Unpin for MatrixSlice<'a, T>
impl<'a, T> UnwindSafe for MatrixSlice<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> RefUnwindSafe for MatrixSlice<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator, [src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,