54 releases

Uses old Rust 2015

0.19.0 Apr 18, 2021
0.17.0 Feb 13, 2021
0.16.0 May 26, 2018
0.15.2 Mar 5, 2018
0.0.2 Nov 21, 2014

#46 in Math

Download history 2904/week @ 2023-11-21 3875/week @ 2023-11-28 2907/week @ 2023-12-05 3395/week @ 2023-12-12 2283/week @ 2023-12-19 1398/week @ 2023-12-26 3060/week @ 2024-01-02 3560/week @ 2024-01-09 3699/week @ 2024-01-16 3470/week @ 2024-01-23 3353/week @ 2024-01-30 3288/week @ 2024-02-06 3996/week @ 2024-02-13 4533/week @ 2024-02-20 4959/week @ 2024-02-27 3980/week @ 2024-03-05

18,126 downloads per month
Used in 58 crates (17 directly)

Apache-2.0/MIT

700KB
38K SLoC

LAPACK Package Documentation Build

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.

Dependencies

~60MB
~746K SLoC