Struct matrust::Matrix
[−]
[src]
pub struct Matrix<A> { /* fields omitted */ }
Methods
impl<A: Clone> Matrix<A>
[src]
fn new(rows: usize, cols: usize, val: A) -> Matrix<A>
fn new_with_val(
rows: usize,
cols: usize,
val: Vec<A>
) -> Result<Matrix<A>, &'static str>
rows: usize,
cols: usize,
val: Vec<A>
) -> Result<Matrix<A>, &'static str>
fn index(&self, row: usize, col: usize) -> Result<A, &'static str>
fn insert(
&mut self,
row: usize,
col: usize,
value: A
) -> Result<(), &'static str>
&mut self,
row: usize,
col: usize,
value: A
) -> Result<(), &'static str>
fn dimensions(&self) -> (usize, usize)
fn map<F, B>(&self, f: F) -> Matrix<B> where
F: Fn(A) -> B,
F: Fn(A) -> B,
fn map2<F, B: Clone, C>(
&self,
m: &Matrix<B>,
f: F
) -> Result<Matrix<C>, &'static str> where
F: Fn(A, B) -> C,
&self,
m: &Matrix<B>,
f: F
) -> Result<Matrix<C>, &'static str> where
F: Fn(A, B) -> C,
fn transpose(&self) -> Matrix<A>
impl<A: Clone + Num> Matrix<A>
[src]
fn add(&self, m: &Matrix<A>) -> Result<Matrix<A>, &'static str>
fn sub(&self, m: &Matrix<A>) -> Result<Matrix<A>, &'static str>
fn scale(&self, n: A) -> Matrix<A>
impl<A: Clone + Num + Sum> Matrix<A>
[src]
Trait Implementations
impl<A: Debug> Debug for Matrix<A>
[src]
impl<A: PartialEq> PartialEq for Matrix<A>
[src]
fn eq(&self, __arg_0: &Matrix<A>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Matrix<A>) -> bool
This method tests for !=
.