[][src]Struct peroxide::structure::matrix::Matrix

pub struct Matrix {
    pub data: Vec<f64>,
    pub row: usize,
    pub col: usize,
    pub shape: Shape,
}

R-like matrix structure

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = Matrix {
    data: vec![1f64,2f64,3f64,4f64],
    row: 2,
    col: 2,
    shape: Row,
}; // [[1,2],[3,4]]

Fields

data: Vec<f64>row: usizecol: usizeshape: Shape

Implementations

impl Matrix[src]

Main matrix structure

pub fn ptr(&self) -> *const f64[src]

Raw pointer for self.data

pub fn mut_ptr(&mut self) -> *mut f64[src]

Raw mutable pointer for self.data

pub fn as_slice<'a>(&'a self) -> &'a [f64][src]

Slice of self.data

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = matrix(vec![1,2,3,4], 2, 2, Col);
let b = a.as_slice();
assert_eq!(b, &[1f64,2f64,3f64,4f64]);

pub fn as_mut_slice<'a>(&'a mut self) -> &'a mut [f64][src]

Mutable slice of self.data

Examples

extern crate peroxide;
use peroxide::fuga::*;

let mut a = matrix(vec![1,2,3,4], 2, 2, Col);
let mut b = a.as_mut_slice();
b[0] = 5f64;
assert_eq!(b, &[5f64, 2f64, 3f64, 4f64]);
assert_eq!(a, matrix(vec![5,2,3,4], 2, 2, Col));

pub fn change_shape(&self) -> Self[src]

Change Bindings

Row -> Col or Col -> Row

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = matrix(vec![1,2,3,4],2,2,Row);
assert_eq!(a.shape, Row);
let b = a.change_shape();
assert_eq!(b.shape, Col);

pub fn change_shape_mut(&mut self)[src]

Change Bindings Mutably

Row -> Col or Col -> Row

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = matrix(vec![1,2,3,4],2,2,Row);
assert_eq!(a.shape, Row);
let b = a.change_shape();
assert_eq!(b.shape, Col);

pub fn spread(&self) -> String[src]

Spread data(1D vector) to 2D formatted String

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = matrix(vec![1,2,3,4],2,2,Row);
println!("{}", a.spread()); // same as println!("{}", a);
// Result:
//       c[0] c[1]
// r[0]     1    3
// r[1]     2    4

pub fn col(&self, index: usize) -> Vec<f64>[src]

Extract Column

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix(c!(1,2,3,4), 2, 2, Row);
    assert_eq!(a.col(0), c!(1,3));
}

pub fn row(&self, index: usize) -> Vec<f64>[src]

Extract Row

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix(c!(1,2,3,4), 2, 2, Row);
    assert_eq!(a.row(0), c!(1,2));
}

pub fn diag(&self) -> Vec<f64>[src]

Extract diagonal components

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix!(1;4;1, 2, 2, Row);
    assert_eq!(a.diag(), c!(1,4));
}

pub fn transpose(&self) -> Self[src]

Transpose

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = matrix(vec![1,2,3,4], 2, 2, Row);
println!("{}", a); // [[1,3],[2,4]]

pub fn t(&self) -> Self[src]

R-like transpose function

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix!(1;4;1, 2, 2, Row);
    assert_eq!(a.transpose(), a.t());
}

pub fn write(&self, file_path: &str) -> Result<(), Box<dyn Error>>[src]

Write to CSV

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix(c!(1,2,3,3,2,1), 3, 2, Col);
    a.write("example_data/test.csv");
}

pub fn write_round(
    &self,
    file_path: &str,
    round: usize
) -> Result<(), Box<dyn Error>>
[src]

Write to CSV (with round option)

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix(c!(1,2,3,3,2,1), 3, 2, Col);
    a.write_round("example_data/test.csv", 0);
}

pub fn write_with_header(
    &self,
    file_path: &str,
    header: Vec<&str>
) -> Result<(), Box<dyn Error>>
[src]

pub fn write_with_header_round(
    &self,
    file_path: &str,
    header: Vec<&str>,
    round: usize
) -> Result<(), Box<dyn Error>>
[src]

pub fn read(
    file_path: &str,
    header: bool,
    delimiter: char
) -> Result<Matrix, Box<dyn Error>>
[src]

Read from CSV

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;
use std::process;

fn main() {
    let a = matrix(c!(1,2,3,3,2,1), 3, 2, Col);
    a.write_round("example_data/test.csv", 0);

    let b = Matrix::read("example_data/test.csv", false, ','); // header = false, delimiter = ','
    match b {
        Ok(mat) => println!("{}", mat),
        Err(err) => {
            println!("{}", err);
            process::exit(1);
        }
    }
}

pub fn subs(&mut self, idx: usize, v: &Vec<f64>)[src]

Should check shape

pub fn subs_col(&mut self, idx: usize, v: &Vec<f64>)[src]

Substitute Col

pub fn subs_row(&mut self, idx: usize, v: &Vec<f64>)[src]

Substitute Row

pub fn from_index<F, G>(f: F, size: (usize, usize)) -> Matrix where
    F: Fn(usize, usize) -> G + Copy,
    G: Into<f64>, 
[src]

From index operations

pub fn to_vec(&self) -> Vec<Vec<f64>>[src]

Matrix to Vec<Vec<f64>>

To send Matrix to inline-python

pub fn to_diag(&self) -> Matrix[src]

pub fn submat(&self, start: (usize, usize), end: (usize, usize)) -> Matrix[src]

Submatrix

Description

Return below elements of matrix to new matrix

$$ \begin{pmatrix} \ddots & & & & \\ & start & \cdots & end.1 & \\ & \vdots & \ddots & \vdots & \\ & end.0 & \cdots & end & \\ & & & & \ddots \end{pmatrix} $$

Examples

extern crate peroxide;
use peroxide::fuga::*;
 
fn main() {
    let a = ml_matrix("1 2 3;4 5 6;7 8 9");
    let b = ml_matrix("5 6;8 9");
    let c = a.submat((1, 1), (2, 2));
    assert_eq!(b, c);   
}

pub fn subs_mat(
    &mut self,
    start: (usize, usize),
    end: (usize, usize),
    m: &Matrix
)
[src]

Substitute matrix to specific position

Description

Substitute below elements of matrix

$$ \begin{pmatrix} \ddots & & & & \\ & start & \cdots & end.1 & \\ & \vdots & \ddots & \vdots & \\ & end.0 & \cdots & end & \\ & & & & \ddots \end{pmatrix} $$

Examples

extern crate peroxide;
use peroxide::fuga::*;
 
fn main() {
    let mut a = ml_matrix("1 2 3;4 5 6;7 8 9");
    let b = ml_matrix("1 2;3 4");
    let c = ml_matrix("1 2 3;4 1 2;7 3 4");
    a.subs_mat((1,1), (2,2), &b);
    assert_eq!(a, c);       
}

pub fn from_series(
    series: &Series,
    row: usize,
    col: usize,
    shape: Shape
) -> Self
[src]

Matrix from series

Example

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = Series::new(c!(1,2,3,4));
    let m = Matrix::from_series(&a, 2, 2, Row);
     
    assert_eq!(m, matrix(c!(1,2,3,4), 2, 2, Row));
}

Trait Implementations

impl<'a, 'b> Add<&'b Matrix> for &'a Matrix[src]

type Output = Matrix

The resulting type after applying the + operator.

impl Add<Matrix> for Matrix[src]

Element-wise addition of Matrix

Caution

You should remember ownership. If you use Matrix a,b then you can't use them after.

type Output = Self

The resulting type after applying the + operator.

impl<T> Add<T> for Matrix where
    T: Into<f64> + Copy
[src]

Element-wise addition between Matrix & f64

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix!(1;4;1, 2, 2, Row);
    assert_eq!(a + 1, matrix!(2;5;1, 2, 2, Row));
}

type Output = Self

The resulting type after applying the + operator.

impl<'a, T> Add<T> for &'a Matrix where
    T: Into<f64> + Copy
[src]

Element-wise addition between &Matrix & f64

type Output = Matrix

The resulting type after applying the + operator.

impl Clone for Matrix[src]

impl Debug for Matrix[src]

impl Default for Matrix[src]

impl Display for Matrix[src]

Pretty Print

impl Div<f64> for Matrix[src]

Element-wise division between Matrix vs f64

type Output = Self

The resulting type after applying the / operator.

impl<'a> Div<f64> for &'a Matrix[src]

type Output = Matrix

The resulting type after applying the / operator.

impl Div<i32> for Matrix[src]

type Output = Self

The resulting type after applying the / operator.

impl<'a> Div<i32> for &'a Matrix[src]

type Output = Matrix

The resulting type after applying the / operator.

impl Div<i64> for Matrix[src]

type Output = Self

The resulting type after applying the / operator.

impl<'a> Div<i64> for &'a Matrix[src]

type Output = Matrix

The resulting type after applying the / operator.

impl Div<usize> for Matrix[src]

type Output = Self

The resulting type after applying the / operator.

impl<'a> Div<usize> for &'a Matrix[src]

type Output = Matrix

The resulting type after applying the / operator.

impl Environment for Matrix[src]

impl FPMatrix for Matrix[src]

impl Index<(usize, usize)> for Matrix[src]

Index for Matrix

(usize, usize) -> f64

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = matrix(vec![1,2,3,4],2,2,Row);
assert_eq!(a[(0,1)], 2f64);

type Output = f64

The returned type after indexing.

impl IndexMut<(usize, usize)> for Matrix[src]

IndexMut for Matrix (Assign)

(usize, usize) -> f64

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let mut a = matrix!(1;4;1, 2, 2, Row);
    a[(1,1)] = 10.0;
    assert_eq!(a, matrix(c!(1,2,3,10), 2, 2, Row));
}

impl InnerProduct for Matrix[src]

Frobenius inner product

impl<'a> Into<&'a Vec<f64, Global>> for &'a Matrix[src]

&Matrix to &Vec

impl Into<Matrix> for SPMatrix[src]

impl Into<SPMatrix> for Matrix[src]

impl Into<Vec<f64, Global>> for Matrix[src]

Matrix to Vec

impl LinearAlgebra for Matrix[src]

pub fn back_subs(&self, b: &Vec<f64>) -> Vec<f64>[src]

Backward Substitution for Upper Triangular

pub fn forward_subs(&self, b: &Vec<f64>) -> Vec<f64>[src]

Forward substitution for Lower Triangular

pub fn lu(&self) -> PQLU[src]

LU Decomposition Implements (Complete Pivot)

Description

It use complete pivoting LU decomposition. You can get two permutations, and LU matrices.

Caution

It returns Option<PQLU> - You should unwrap to obtain real value. PQLU has four field - p, q, l, u. p, q are permutations. l, u are matrices.

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix(vec![1,2,3,4], 2, 2, Row);
    let pqlu = a.lu();
    let (p,q,l,u) = (pqlu.p, pqlu.q, pqlu.l, pqlu.u);
    assert_eq!(p, vec![1]); // swap 0 & 1 (Row)
    assert_eq!(q, vec![1]); // swap 0 & 1 (Col)
    assert_eq!(l, matrix(c!(1,0,0.5,1),2,2,Row));
    assert_eq!(u, matrix(c!(4,3,0,-0.5),2,2,Row));
}

pub fn qr(&self) -> QR[src]

QR Decomposition

Translation of RosettaCode#Python

Example

extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = ml_matrix("12 -51 4;6 167 -68; -4 24 -41");
    let qr = a.qr();
    let r = ml_matrix("-14 -21 14; 0 -175 70; 0 0 -35");
    #[cfg(feature="O3")]
    {
        assert_eq!(r, qr.r);
    }
    qr.r.print();
}

pub fn svd(&self) -> SVD[src]

Singular Value Decomposition

Examples

extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = ml_matrix("3 2 2;2 3 -2");
    #[cfg(feature="O3")]
    {
        let svd = a.svd();
        assert!(eq_vec(&vec![5f64, 3f64], &svd.s, 1e-7));
    }
    a.print();
}

pub fn rref(&self) -> Matrix[src]

Reduced Row Echelon Form

Implementation of RosettaCode

pub fn det(&self) -> f64[src]

Determinant

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix!(1;4;1, 2, 2, Row);
    assert_eq!(a.det(), -2f64);
}

pub fn block(&self) -> (Self, Self, Self, Self)[src]

Block Partition

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix!(1;16;1, 4, 4, Row);
    let (m1, m2, m3, m4) = a.block();
    assert_eq!(m1, matrix(c!(1,2,5,6), 2, 2, Row));
    assert_eq!(m2, matrix(c!(3,4,7,8), 2, 2, Row));
    assert_eq!(m3, matrix(c!(9,10,13,14), 2, 2, Row));
    assert_eq!(m4, matrix(c!(11,12,15,16), 2, 2, Row));

    let b = matrix!(1;16;1, 4, 4, Col);
    let (m1, m2, m3, m4) = b.block();
    assert_eq!(m1, matrix(c!(1,2,5,6), 2, 2, Col));
    assert_eq!(m3, matrix(c!(3,4,7,8), 2, 2, Col));
    assert_eq!(m2, matrix(c!(9,10,13,14), 2, 2, Col));
    assert_eq!(m4, matrix(c!(11,12,15,16), 2, 2, Col));
}

pub fn inv(&self) -> Self[src]

Inverse of Matrix

Caution

inv function returns Option<Matrix> Thus, you should use pattern matching or unwrap to obtain inverse.

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    // Non-singular
    let a = matrix!(1;4;1, 2, 2, Row);
    assert_eq!(a.inv(), matrix(c!(-2,1,1.5,-0.5),2,2,Row));

    // Singular
    //let b = matrix!(1;9;1, 3, 3, Row);
    //let c = b.inv(); // Can compile but..
    //let d = b.det();
    //assert_eq!(d, 0f64);
}

pub fn pseudo_inv(&self) -> Self[src]

Moore-Penrose Pseudo inverse

Description

$X^\dagger = (X^T X)^{-1} X^T$

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix!(1;4;1, 2, 2, Row);
    let inv_a = a.inv();
    let pse_a = a.pseudo_inv();

    assert_eq!(inv_a, pse_a); // Nearly equal
}

pub fn solve(&self, b: &Vec<f64>, sk: SolveKind) -> Vec<f64>[src]

Solve with Vector

Solve options

  • LU: Gaussian elimination with Complete pivoting LU (GECP)
  • WAZ: Solve with WAZ decomposition

Reference

  • Biswa Nath Datta, Numerical Linear Algebra and Applications, Second Edition
  • Ke Chen, Matrix Preconditioning Techniques and Applications, Cambridge Monographs on Applied and Computational Mathematics

impl LinearOp<Vec<f64, Global>, Vec<f64, Global>> for Matrix[src]

TODO: Transpose Matrix as Linear operator for Vector

impl MATLAB for Matrix[src]

impl MatrixProduct for Matrix[src]

impl MatrixPtr for Matrix[src]

pub unsafe fn row_ptr(&self, idx: usize) -> Vec<*const f64>[src]

Row pointer

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = ml_matrix("1 2;3 4");
    unsafe {
        let b = a.row_ptr(1);
        let b_vec = ptr_to_vec(&b);
        assert_eq!(b_vec, vec![3f64, 4f64]);
    }
}

impl<'a, 'b> Mul<&'b Matrix> for &'a Matrix[src]

type Output = Matrix

The resulting type after applying the * operator.

impl<'a, 'b> Mul<&'b Vec<f64, Global>> for &'a Matrix[src]

type Output = Vec<f64>

The resulting type after applying the * operator.

impl Mul<Matrix> for Matrix[src]

Matrix Multiplication

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix!(1;4;1, 2, 2, Row);
    let b = matrix!(1;4;1, 2, 2, Col);
    assert_eq!(a * b, matrix(c!(5, 11, 11, 25), 2, 2, Row));
}

type Output = Self

The resulting type after applying the * operator.

impl Mul<Redox<Vec<f64, Global>>> for Matrix[src]

type Output = Redox<Vec<f64>>

The resulting type after applying the * operator.

impl Mul<Redox<Vec<f64, Global>>> for &Matrix[src]

type Output = Redox<Vec<f64>>

The resulting type after applying the * operator.

impl Mul<Vec<f64, Global>> for Matrix[src]

type Output = Vec<f64>

The resulting type after applying the * operator.

impl Mul<f64> for Matrix[src]

Element-wise multiplication between Matrix vs f64

type Output = Self

The resulting type after applying the * operator.

impl Mul<i32> for Matrix[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<i64> for Matrix[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<usize> for Matrix[src]

type Output = Self

The resulting type after applying the * operator.

impl MutMatrix for Matrix[src]

impl Neg for Matrix[src]

Negation of Matrix

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = matrix(vec![1,2,3,4],2,2,Row);
println!("{}", -a); // [[-1,-2],[-3,-4]]

type Output = Self

The resulting type after applying the - operator.

impl<'a> Neg for &'a Matrix[src]

Negation of &'a Matrix

type Output = Matrix

The resulting type after applying the - operator.

impl Normed for Matrix[src]

type Scalar = f64

impl PYTHON for Matrix[src]

impl PartialEq<Matrix> for Matrix[src]

PartialEq implements

impl Printable for Matrix[src]

impl R for Matrix[src]

impl Scalable for Matrix[src]

Modify Matrix

type Vec = Vec<f64>

pub fn resize(&self, (r, c): (usize, usize), shape: Shape) -> Matrix[src]

Resize matrix

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = ml_matrix("1 2 3;4 5 6"); // ml_matrix has shape `Col`
    let b1 = a.resize((3, 2), Row);
    let b2 = a.resize((3, 2), Col);
    assert_eq!(b1, ml_matrix("1 2;3 4;5 6"));
    assert_eq!(b2, ml_matrix("1 4;2 5;3 6"));
}

pub fn add_row(&self, v: &Self::Vec) -> Matrix[src]

Add row

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = ml_matrix("1 2 3;4 5 6");
    let b = c!(7,8,9);
    let c = a.add_row(&b);
    assert_eq!(c, ml_matrix("1 2 3;4 5 6;7 8 9"));
}

pub fn add_col(&self, v: &Self::Vec) -> Matrix[src]

Add column

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = ml_matrix("1 2 3;4 5 6");
    let b = c!(7,8);
    let c = a.add_col(&b);
    assert_eq!(c, ml_matrix("1 2 3 7;4 5 6 8"));
}

impl ScalableMut for Matrix[src]

type Vec = Vec<f64>

pub fn resize_mut(&mut self, (r, c): (usize, usize), shape: Shape)[src]

Resize matrix (Mutable)

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let mut a = ml_matrix("1 2 3;4 5 6"); // ml_matrix has shape `Row`
    a.resize_mut((3, 2), Row);
    assert_eq!(a, ml_matrix("1 2;3 4;5 6"));
    a.resize_mut((3, 2), Col);
    assert_eq!(a, ml_matrix("1 4;2 5;3 6"));
}

pub fn add_row_mut(&mut self, v: &Self::Vec)[src]

Add row (Mutable)

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let mut a = ml_matrix("1 2 3;4 5 6");
    let b = c!(7,8,9);
    a.add_row_mut(&b);
    assert_eq!(a, ml_matrix("1 2 3;4 5 6;7 8 9"));
}

pub fn add_col_mut(&mut self, v: &Self::Vec)[src]

Add column (Mutable)

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let mut a = ml_matrix("1 2 3;4 5 6");
    let b = c!(7,8);
    a.add_col_mut(&b);
    assert_eq!(a, ml_matrix("1 2 3 7;4 5 6 8"));
}

impl SimpleNorm for Matrix[src]

Simple Frobenius norm

impl SimplerLinearAlgebra for Matrix[src]

impl Statistics for Matrix[src]

type Array = Matrix

type Value = Vec<f64>

pub fn mean(&self) -> Vec<f64>[src]

Column Mean

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let m = matrix(c!(1,3,3,1), 2, 2, Col);
    assert_eq!(m.mean(), c!(2,2));
}

pub fn var(&self) -> Vec<f64>[src]

Column variance

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let m = matrix(c!(1,2,3,3,2,1), 3, 2, Col);
    assert!(nearly_eq(m.var()[0], 1));
}

pub fn sd(&self) -> Vec<f64>[src]

Column Standard Deviation

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let m = matrix(c!(1,2,3,3,2,1), 3, 2, Col);
    assert!(nearly_eq(m.sd()[0], 1));
}

pub fn cov(&self) -> Self[src]

Covariance Matrix (Column based)

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let m = matrix(c!(1,2,3,3,2,1), 3, 2, Col);
    println!("{}", m.cov());

    //         c[0]    c[1]
    // r[0]  1.0000 -1.0000
    // r[1] -1.0000  1.0000
}

impl<'a, 'b> Sub<&'b Matrix> for &'a Matrix[src]

type Output = Matrix

The resulting type after applying the - operator.

impl Sub<Matrix> for Matrix[src]

Subtraction between Matrix

Examples

extern crate peroxide;
use peroxide::fuga::*;

let a = matrix(vec![1,2,3,4],2,2,Row);
let b = matrix(vec![1,2,3,4],2,2,Col);
println!("{}", a - b); // [[0, -1], [1, 0]]

type Output = Self

The resulting type after applying the - operator.

impl<T> Sub<T> for Matrix where
    T: Into<f64> + Copy
[src]

Subtraction between Matrix & f64

type Output = Self

The resulting type after applying the - operator.

impl<'a, T> Sub<T> for &'a Matrix where
    T: Into<f64> + Copy
[src]

Subtraction between &Matrix & f64

type Output = Matrix

The resulting type after applying the - operator.

impl Vector for Matrix[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,