LAPACK: Rust wrappers for the LAPACK library

LAPACK

The package provides wrappers for LAPACK (Fortran).

Architecture

Example

use lapack::*;

let n = 3;
let mut a = vec![3.0, 1.0, 1.0, 1.0, 3.0, 1.0, 1.0, 1.0, 3.0];
let mut w = vec![0.0; n as usize];
let mut work = vec![0.0; 4 * n as usize];
let lwork = 4 * n;
let mut info = 0;

unsafe {
    dsyev(b'V', b'U', n, &mut a, n, &mut w, &mut work, lwork, &mut info);
}

assert!(info == 0);
for (one, another) in w.iter().zip(&[2.0, 2.0, 5.0]) {
    assert!((one - another).abs() < 1e-14);
}

Development

The code is generated via a Python script based on the content the lapack-sys submodule. To re-generate, run the following commands:

./bin/generate.py > src/lapack-sys.rs
rustfmt src/lapack-sys.rs

Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.

.gitignore

/Cargo.lock
/target

.gitmodules

[submodule "lapack-sys"]
	path = lapack-sys
	url = https://github.com/blas-lapack-rs/lapack-sys.git

.travis.yml

language: rust

os:
  - linux
  - osx

rust:
  - stable
  - beta
  - nightly

notifications:
  email: false

Cargo.toml

[package]
name = "lapack"
version = "0.19.0"
license = "Apache-2.0/MIT"
authors = [
    "Andrew Straw <strawman@astraw.com>",
    "Crozet Sébastien <developer@crozet.re>",
    "David Greenberg <dsg123456789@gmail.com>",
    "Ivan Ukhov <ivan.ukhov@gmail.com>",
    "Pavel Potocek <pavelpotocek@gmail.com>",
    "Selvavignesh Vedamanickam <selvavm@hotmail.com>",
    "Toshiki Teramura <toshiki.teramura@gmail.com>",
]
description = "The package provides wrappers for LAPACK (Fortran)."
documentation = "https://docs.rs/lapack"
homepage = "https://github.com/blas-lapack-rs/lapack"
repository = "https://github.com/blas-lapack-rs/lapack"
readme = "README.md"
categories = ["api-bindings", "science"]
keywords = ["linear-algebra"]

[dependencies]
libc = "0.2"

[dependencies.num-complex]
version = "0.4"
default-features = false

[dependencies.lapack-sys]
version = "0.14"
default-features = false

Download details:

Author: blas-lapack-rs
Source: https://github.com/blas-lapack-rs/lapack

License: View license

#rust 

LAPACK: Rust wrappers for the LAPACK library
1.35 GEEK