Function peroxide::structure::matrix::matrix

source ·
pub fn matrix<T>(v: Vec<T>, r: usize, c: usize, shape: Shape) -> Matrix
where T: Into<f64>,
Expand description

R-like matrix constructor

§Examples

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

fn main() {
    let a = matrix(c!(1,2,3,4), 2, 2, Row);
    a.print(); // Print matrix
}