Struct generic_matrix::Matrix
[−]
[src]
pub struct Matrix<T> {
// some 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
Creates a new Matrix.
fn from_vec(row: usize, column: usize, data: Vec<T>) -> Matrix<T>
Creates a new Matrix from vector.
fn size(&self) -> (usize, usize)
Returns the matrix's row and column.
fn row(&self) -> usize
Returns the matrix's row.
fn column(&self) -> usize
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: Debug> Debug for Matrix<T>[src]
impl<T: Clone> Clone for Matrix<T>[src]
fn clone(&self) -> Matrix<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl<T: Eq> Eq for Matrix<T>[src]
impl<T: PartialEq> PartialEq for Matrix<T>[src]
fn eq(&self, __arg_0: &Matrix<T>) -> bool
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
This method tests for !=.
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
The method for the indexing (Foo[Bar]) operation
impl<T> IndexMut<(usize, usize)> for Matrix<T>[src]
fn index_mut(&mut self, (i, j): (usize, usize)) -> &mut T
The method for the indexing (Foo[Bar]) operation
impl<Lhs, Rhs> Add<Matrix<Rhs>> for Matrix<Lhs> where Lhs: Add<Rhs> + Clone, Rhs: Clone[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the + operator
fn add(self, other: Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the + operator
impl<'a, Lhs, Rhs> Add<Matrix<Rhs>> for &'a Matrix<Lhs> where Lhs: Add<Rhs> + Clone, Rhs: Clone[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the + operator
fn add(self, other: Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the + operator
impl<'a, Lhs, Rhs> Add<&'a Matrix<Rhs>> for Matrix<Lhs> where Lhs: Add<Rhs> + Clone, Rhs: Clone[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the + operator
fn add(self, other: &Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the + operator
impl<'a, 'b, Lhs, Rhs> Add<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where Lhs: Add<Rhs> + Clone, Rhs: Clone[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the + operator
fn add(self, other: &Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the + operator
impl<Lhs, Rhs> Sub<Matrix<Rhs>> for Matrix<Lhs> where Lhs: Sub<Rhs> + Clone, Rhs: Clone[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the - operator
fn sub(self, other: Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the - operator
impl<'a, Lhs, Rhs> Sub<Matrix<Rhs>> for &'a Matrix<Lhs> where Lhs: Sub<Rhs> + Clone, Rhs: Clone[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the - operator
fn sub(self, other: Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the - operator
impl<'a, Lhs, Rhs> Sub<&'a Matrix<Rhs>> for Matrix<Lhs> where Lhs: Sub<Rhs> + Clone, Rhs: Clone[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the - operator
fn sub(self, other: &Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the - operator
impl<'a, 'b, Lhs, Rhs> Sub<&'b Matrix<Rhs>> for &'a Matrix<Lhs> where Lhs: Sub<Rhs> + Clone, Rhs: Clone[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the - operator
fn sub(self, other: &Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the - operator
impl<Lhs, Rhs> Mul<Matrix<Rhs>> for Matrix<Lhs> where Lhs: Mul<Rhs> + Clone, Rhs: Clone, Lhs::Output: Add<Output=Lhs::Output>[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the * operator
fn mul(self, other: Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the * operator
impl<'a, Lhs, Rhs> Mul<Matrix<Rhs>> for &'a Matrix<Lhs> where Lhs: Mul<Rhs> + Clone, Rhs: Clone, Lhs::Output: Add<Output=Lhs::Output>[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the * operator
fn mul(self, other: Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the * operator
impl<'a, Lhs, Rhs> Mul<&'a Matrix<Rhs>> for Matrix<Lhs> where Lhs: Mul<Rhs> + Clone, Rhs: Clone, Lhs::Output: Add<Output=Lhs::Output>[src]
type Output = Matrix<Lhs::Output>
The resulting type after applying the * operator
fn mul(self, other: &Matrix<Rhs>) -> Matrix<Lhs::Output>
The method for the * operator