linxal

Status

Crate Version Build Status Documentation

Description

linxal is a linear algebra package for rust. linxal uses LAPACK as a backend, (specifically with the lapack package) to execute linear algebra routines with rust-ndarray as inputs and outputs.

Installation / Usage

linxal is available on crates.io and can be installed via cargo. In your Cargo.toml file, you can use.

text [dependencies] .... linxal = "0.5"

Features

linxal exposes features to choose the underlying LAPACK / BLAS source. By default, linxal enables the openblas feature, which compiles LAPACK and BLAS from the OpenBLAS distribution via openblas-src. You can use netlib LAPACK instead, via:

text ... [dependencies.linxal] version = "0.5" default-features = false features = ["netlib"]

Other possible features are openblas-system and netlib-system. These are similar to openblas and netlib, execpt that they use the installed shared libraries on your system instead of compiling them from source.

Documentation

Documentation can be found at https://github.masonium.io/rustdoc/linxal/.

Example

```rust

[macro_use]

extern crate linxal; extern crate ndarray;

use linxal::eigenvalues::{Eigen}; use linxal::types::{c32, LinxalScalar}; use ndarray::{Array, arr1, arr2};

fn main() { let m = arr2(&[[1.0f32, 2.0], [-2.0, 1.0]]);

let r = Eigen::compute_into(m, false, true);
assert!(r.is_ok());

let r = r.unwrap();
let true_evs = arr1(&[c32::new(1.0, 2.0), c32::new(1.0, -2.0)]);
assert_eq_within_tol!(true_evs, r.values, 0.01);

} ```

Priorities

Non-Goals

Goals

Contributing

Pull requests of all kinds (code, documentation, formatting, spell-checks) are welcome!