Crate nalgebra_lapack

Crate nalgebra_lapack 

Source
Expand description

§nalgebra-lapack

Rust library for linear algebra using nalgebra and LAPACK.

§Selecting a LAPACK Backend

This crate uses cargo features to select which lapack provider (or implementation) is used.

§Default LAPACK Backend and Performance

By default, the lapack-src crate is used as a LAPACK source, which bundles netlib and works out of the box, given an existing FORTRAN compiler on your system. That makes this choice practical, but it’s typically not the best performing backend.

§LAPACK Backends

LAPACK backends other than lapack-netlib typically assume the libraries or frameworks are present on your system. See the respective vendors how to install them. Backends are selected using one of the lapack-* feature flags:

  • lapack-netlib: use the bundled Netlib reference implementation. This feature is enabled by default.
  • lapack-openblas: Use LAPACK provided via OpenBLAS.
  • lapack-accelerate: Use Apple’s Accelerate framework.
  • lapack-mkl: alias for lapack-mkl-static-seq. A useful default for Intel MKL.
  • lapack-mkl-static-seq: statically link the sequential version of MKL.
  • lapack-mkl-static-par: statically link the parallel version of MKL.
  • lapack-mkl-dynamic-seq: dynamically link the sequential version of MKL.
  • lapack-mkl-dynamic-par: dynamically link the parallel version of MKL.
  • lapack-custom: Use a custom LAPACK backend whose functions must be available at link time. It is your responsibility to make sure those are ABI compatible with the function signatures in the lapack crate.

Note that exactly one of these features must be selected and that lapack-netlib is selected by default, which means you have to disable default features when explicitly specifying a LAPACK backend.

nalgebra-lapack = { version = "*", default-features = false, features = ["lapack-*"] }

§Performance

As always, there’s only one way to find out if nalgebra-lapack brings a performance benefit to your project, which is measuring. The same goes for deciding which LAPACK backend to use, if you have multiple available options.

§License

MIT

§Contributors

This integration of LAPACK with nalgebra was initiated by Andrew Straw. It then became officially supported and integrated into the main nalgebra repository.

Re-exports§

pub use self::colpiv_qr::ColPivQR;
pub use self::qr::QR;

Modules§

colpiv_qr
Column-pivoted QR decomposition of a rectangular (or square) matrix.
qr
QR decomposition of a rectangular (or square) matrix.

Structs§

Cholesky
The Cholesky decomposition of a symmetric positive-definite matrix.
Eigen
Eigendecomposition of a real square matrix with real or complex eigenvalues.
GeneralizedEigen
Generalized eigenvalues and generalized eigenvectors (left and right) of a pair of N*N real square matrices.
Hessenberg
The Hessenberg decomposition of a general matrix.
LU
LU decomposition with partial pivoting.
LapackErrorCode
Newtype for a LAPACK error code.
QZ
QZ decomposition of a pair of N*N square matrices.
SVD
The SVD decomposition of a general matrix.
Schur
Eigendecomposition of a real square matrix with real eigenvalues.
SymmetricEigen
Eigendecomposition of a real square symmetric matrix with real eigenvalues.

Enums§

DiagonalKind
Property of the diagonal of a triangular matrix.
Side
Indicates the side from which a matrix multiplication is to be performed.
Transposition
Indicates whether or not to transpose a matrix during a matrix operation.
TriangularStructure
Describes the type of a triangular matrix.

Traits§

CholeskyScalar
Trait implemented by floats (f32, f64) and complex floats (Complex<f32>, Complex<f64>) supported by the Cholesky decomposition.
LUScalar
Trait implemented by scalars for which Lapack implements the LU decomposition.
QrDecomposition
Common functionality for the QR decomposition of an m × n matrix A with or without column-pivoting.