55 releases

0.20.0 Feb 8, 2025
0.19.0 Apr 18, 2021
0.18.0 Apr 10, 2021
0.17.0 Feb 13, 2021
0.0.2 Nov 21, 2014

#15 in Math

Download history 3839/week @ 2024-11-20 4177/week @ 2024-11-27 4805/week @ 2024-12-04 5337/week @ 2024-12-11 3116/week @ 2024-12-18 2069/week @ 2024-12-25 4340/week @ 2025-01-01 4735/week @ 2025-01-08 4273/week @ 2025-01-15 4270/week @ 2025-01-22 7298/week @ 2025-01-29 5091/week @ 2025-02-05 3610/week @ 2025-02-12 2811/week @ 2025-02-19 3625/week @ 2025-02-26 4171/week @ 2025-03-05

15,201 downloads per month
Used in 66 crates (19 directly)

Apache-2.0 OR 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