Struct juggernaut::matrix::Matrix
[−]
[src]
pub struct Matrix(_);
Trait Implementations
impl Debug for Matrix
[src]
impl Clone for Matrix
[src]
fn clone(&self) -> Matrix
[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 PartialEq for Matrix
[src]
fn eq(&self, __arg_0: &Matrix) -> 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) -> bool
[src]
This method tests for !=
.
impl MatrixTrait for Matrix
[src]
fn generate(m: usize, n: usize, f: &Fn(usize, usize) -> f64) -> Matrix
[src]
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 generate_by_row(m: usize, n: usize, f: &Fn(usize) -> Vec<f64>) -> Matrix
[src]
Returns a new Matrix with m
rows and n
columns
Works exactly same as generate
but accepts a Fn that returns each row of the matrix
instead of each member of the matrix
fn zero(m: usize, n: usize) -> Matrix
[src]
Returns a vector with m
rows and n
columns with elements of 0
fn random(m: usize, n: usize) -> Matrix
[src]
Returns a vector with m
rows and n
columns with random elements
fn from_vec(v: &Vec<f64>) -> Matrix
[src]
Generates Matrix from a vector
fn row(&self, n: usize) -> &Vec<f64>
[src]
Returns a row of Matrix
fn rows(&self) -> usize
[src]
Number of the Matrix rows
fn cols(&self) -> usize
[src]
Number of the Matrix columns
fn get(&self, m: usize, n: usize) -> f64
[src]
Returns the element in the position M,N
fn dot(&self, b: &Matrix) -> Matrix
[src]
Multiplication with Matrix
fn transpose(&self) -> Matrix
[src]
Transpose of a Matrix
fn map(&self, f: &Fn(f64, usize, usize) -> f64) -> Matrix
[src]
Map
fn map_row(&self, f: &Fn(Vec<f64>) -> Vec<f64>) -> Matrix
[src]
Map for each row of Matrix
fn body(&self) -> &Vec<Vec<f64>>
[src]
To get the first element of the Matrix (Vec