[][src]Trait peroxide::structure::matrix::LinearOps

pub trait LinearOps {
    fn to_matrix(&self) -> Matrix;
fn transpose(&self) -> Matrix;
fn t(&self) -> Matrix; }

Common trait for Matrix & Vector

Required methods

fn to_matrix(&self) -> Matrix

fn transpose(&self) -> Matrix

fn t(&self) -> Matrix

Loading content...

Implementors

impl LinearOps for Matrix[src]

fn to_matrix(&self) -> Self[src]

Just clone

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

Transpose

Examples

extern crate peroxide;
use peroxide::*;

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

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

R-like transpose function

Examples

extern crate peroxide;
use peroxide::*;

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

impl LinearOps for Vector[src]

fn to_matrix(&self) -> Matrix[src]

Vector to Column Matrix

fn transpose(&self) -> Matrix[src]

Vector to Row Matrix

fn t(&self) -> Matrix[src]

R-like Syntax

Loading content...