Struct juggernaut::matrix::Matrix
[−]
[src]
pub struct Matrix(_);
Trait Implementations
impl Debug for Matrix
[src]
impl Clone for Matrix
[src]
fn clone(&self) -> Matrix
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 PartialEq for Matrix
[src]
fn eq(&self, __arg_0: &Matrix) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Matrix) -> bool
This method tests for !=
.
impl MatrixTrait for Matrix
[src]
fn generate(m: usize, n: usize, f: &Fn(usize, usize) -> f64) -> Matrix
Returns a vector with m
rows and n
columns
Example:
use juggernaut::matrix::Matrix; use juggernaut::matrix::MatrixTrait; let matrix = Matrix::generate(2, 2, &|_,_| 2f64);
fn zero(m: usize, n: usize) -> Matrix
Returns a vector with m
rows and n
columns with elements of 0
fn random(m: usize, n: usize) -> Matrix
Returns a vector with m
rows and n
columns with random elements
fn from_vec(v: &Vec<f64>) -> Matrix
Generates Matrix from a vector
fn row(&self, n: usize) -> &Vec<f64>
Returns a row of Matrix
fn rows(&self) -> usize
Number of the Matrix rows
fn cols(&self) -> usize
Number of the Matrix columns
fn get(&self, m: usize, n: usize) -> f64
Returns the element in the position M,N
fn dot(&self, b: &Matrix) -> Matrix
Multiplication with Matrix
fn transpose(&self) -> Matrix
Transpose of a Matrix
fn map(&self, f: &Fn(f64) -> f64) -> Matrix
Map