Struct generic_matrix::Matrix
[−]
[src]
pub struct Matrix<T> { /* fields omitted */ }
2D matrix.
Methods
impl<T> Matrix<T>
[src]
fn from_fn<F>(row: usize, column: usize, f: F) -> Matrix<T> where
F: Fn(usize, usize) -> T,
[src]
F: Fn(usize, usize) -> T,
Creates a new Matrix
.
fn from_vec(row: usize, column: usize, data: Vec<T>) -> Matrix<T>
[src]
Creates a new Matrix
from vector.
fn size(&self) -> (usize, usize)
[src]
Returns the matrix's row and column.
fn row(&self) -> usize
[src]
Returns the matrix's row.
fn column(&self) -> usize
[src]
Returns the matrix's column.
impl<T: Zero> Matrix<T>
[src]
impl<T: One + Zero> Matrix<T>
[src]
impl<T: Clone> Matrix<T>
[src]
Trait Implementations
impl<T: PartialEq> PartialEq for Matrix<T>
[src]
fn eq(&self, __arg_0: &Matrix<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Matrix<T>) -> bool
[src]
This method tests for !=
.
impl<T: Eq> Eq for Matrix<T>
[src]
impl<T: Clone> Clone for Matrix<T>
[src]
fn clone(&self) -> Matrix<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Matrix<T>
[src]
impl<T> Index<(usize, usize)> for Matrix<T>
[src]
type Output = T
The returned type after indexing.
fn index(&self, (i, j): (usize, usize)) -> &T
[src]
Performs the indexing (container[index]
) operation.
impl<T> IndexMut<(usize, usize)> for Matrix<T>
[src]
fn index_mut(&mut self, (i, j): (usize, usize)) -> &mut T
[src]
Performs the mutable indexing (container[index]
) operation.
impl<Lhs, Rhs> Add<Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
[src]
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
type Output = Matrix<<Lhs as Add<Rhs>>::Output>
The resulting type after applying the +
operator.
fn add(self, other: Matrix<Rhs>) -> Matrix<<Lhs as Add<Rhs>>::Output>
[src]
Performs the +
operation.
impl<'a, Lhs, Rhs> Add<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
[src]
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
type Output = Matrix<<Lhs as Add<Rhs>>::Output>
The resulting type after applying the +
operator.
fn add(self, other: Matrix<Rhs>) -> Matrix<<Lhs as Add<Rhs>>::Output>
[src]
Performs the +
operation.
impl<'a, Lhs, Rhs> Add<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
[src]
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
type Output = Matrix<<Lhs as Add<Rhs>>::Output>
The resulting type after applying the +
operator.
fn add(self, other: &Matrix<Rhs>) -> Matrix<<Lhs as Add<Rhs>>::Output>
[src]
Performs the +
operation.
impl<'a, 'b, Lhs, Rhs> Add<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
[src]
Lhs: Add<Rhs> + Clone,
Rhs: Clone,
type Output = Matrix<<Lhs as Add<Rhs>>::Output>
The resulting type after applying the +
operator.
fn add(self, other: &Matrix<Rhs>) -> Matrix<<Lhs as Add<Rhs>>::Output>
[src]
Performs the +
operation.
impl<Lhs, Rhs> Sub<Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
[src]
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
type Output = Matrix<<Lhs as Sub<Rhs>>::Output>
The resulting type after applying the -
operator.
fn sub(self, other: Matrix<Rhs>) -> Matrix<<Lhs as Sub<Rhs>>::Output>
[src]
Performs the -
operation.
impl<'a, Lhs, Rhs> Sub<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
[src]
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
type Output = Matrix<<Lhs as Sub<Rhs>>::Output>
The resulting type after applying the -
operator.
fn sub(self, other: Matrix<Rhs>) -> Matrix<<Lhs as Sub<Rhs>>::Output>
[src]
Performs the -
operation.
impl<'a, Lhs, Rhs> Sub<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
[src]
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
type Output = Matrix<<Lhs as Sub<Rhs>>::Output>
The resulting type after applying the -
operator.
fn sub(self, other: &Matrix<Rhs>) -> Matrix<<Lhs as Sub<Rhs>>::Output>
[src]
Performs the -
operation.
impl<'a, 'b, Lhs, Rhs> Sub<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
[src]
Lhs: Sub<Rhs> + Clone,
Rhs: Clone,
type Output = Matrix<<Lhs as Sub<Rhs>>::Output>
The resulting type after applying the -
operator.
fn sub(self, other: &Matrix<Rhs>) -> Matrix<<Lhs as Sub<Rhs>>::Output>
[src]
Performs the -
operation.
impl<Lhs, Rhs> Mul<Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
[src]
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
type Output = Matrix<<Lhs as Mul<Rhs>>::Output>
The resulting type after applying the *
operator.
fn mul(self, other: Matrix<Rhs>) -> Matrix<<Lhs as Mul<Rhs>>::Output>
[src]
Performs the *
operation.
impl<'a, Lhs, Rhs> Mul<Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
[src]
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
type Output = Matrix<<Lhs as Mul<Rhs>>::Output>
The resulting type after applying the *
operator.
fn mul(self, other: Matrix<Rhs>) -> Matrix<<Lhs as Mul<Rhs>>::Output>
[src]
Performs the *
operation.
impl<'a, Lhs, Rhs> Mul<&'a Matrix<Rhs>> for Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
[src]
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
type Output = Matrix<<Lhs as Mul<Rhs>>::Output>
The resulting type after applying the *
operator.
fn mul(self, other: &Matrix<Rhs>) -> Matrix<<Lhs as Mul<Rhs>>::Output>
[src]
Performs the *
operation.
impl<'a, 'b, Lhs, Rhs> Mul<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,
[src]
Lhs: Mul<Rhs> + Clone,
Rhs: Clone,
<Lhs as Mul<Rhs>>::Output: Add<Output = <Lhs as Mul<Rhs>>::Output>,