ndarray-linalg 0.4.0

Linear algebra package for rust-ndarray using LAPACK

ndarray-linalg

Crate docs.rs wercker status

Linear algebra package for rust-ndarray using LAPACK via stainless-steel/lapack

Examples

extern crate ndarray;
extern crate ndarray_linalg;

use ndarray::prelude::*;
use ndarray_linalg::prelude::*;

fn main() {
    let a = arr2(&[[3.0, 1.0, 1.0], [1.0, 3.0, 1.0], [1.0, 1.0, 3.0]]);
    let (e, vecs) = a.clone().eigh().unwrap();
    println!("eigenvalues = \n{:?}", e);
    println!("V = \n{:?}", vecs);
    let av = a.dot(&vecs);
    println!("AV = \n{:?}", av);
}

See complete example at src/bin/main.rs.

Progress

Some algorithms have not been implemented yet. See #6.

Similar Projects