Crates.io | lapack |
lib.rs | lapack |
version | |
source | src |
created_at | 2014-11-20 21:10:21.518624+00 |
updated_at | 2025-02-08 09:24:40.117531+00 |
description | The package provides wrappers for LAPACK (Fortran). |
homepage | https://github.com/blas-lapack-rs/lapack |
repository | https://github.com/blas-lapack-rs/lapack |
max_upload_size | |
id | 153 |
Cargo.toml error: | TOML parse error at line 26, column 1 | 26 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
The package provides wrappers for LAPACK (Fortran).
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);
}
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
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.