Crate ndarray_linalg[−][src]
The ndarray-linalg
crate provides linear algebra functionalities for ArrayBase
, the n-dimensional array data structure provided by ndarray
.
ndarray-linalg
leverages LAPACK’s routines using the bindings provided by blas-lapack-rs/lapack.
Linear algebra methods
- Decomposition methods:
- Solution of linear systems:
- Inverse matrix computation
Naming Convention
Each routine is usually exposed as a trait, implemented by the relevant types.
For each routine there might be multiple “variants”: different traits corresponding to the different ownership possibilities of the array you intend to work on.
For example, if you are interested in the QR decomposition of a square matrix, you can use:
- QRSquare, if you hold an immutable reference (i.e.
&self
) to the matrix you want to decompose; - QRSquareInplace, if you hold a mutable reference (i.e.
&mut self
) to the matrix you want to decompose; - QRSquareInto, if you can pass the matrix you want to decompose by value (e.g.
self
).
Depending on the algorithm, each variant might require more or less copy operations of the underlying data.
Details are provided in the description of each routine.
Utilities
Re-exports
pub use assert::*; |
pub use cholesky::*; |
pub use convert::*; |
pub use diagonal::*; |
pub use eig::*; |
pub use eigh::*; |
pub use generate::*; |
pub use inner::*; |
pub use layout::*; |
pub use least_squares::*; |
pub use norm::*; |
pub use operator::*; |
pub use opnorm::*; |
pub use qr::*; |
pub use solve::*; |
pub use solveh::*; |
pub use svd::*; |
pub use svddc::*; |
pub use trace::*; |
pub use triangular::*; |
pub use tridiagonal::*; |
pub use types::*; |
Modules
assert | Assertions for array |
cholesky | Cholesky decomposition of Hermitian (or real symmetric) positive definite matrices |
convert | utilities for convert array |
diagonal | Vector as a Diagonal matrix |
eig | Eigenvalue decomposition for non-symmetric square matrices |
eigh | Eigenvalue decomposition for Hermite matrices |
error | Define Errors |
generate | Generator functions for matrices |
inner | |
krylov | Krylov subspace methods |
layout | Convert ndarray into LAPACK-compatible matrix format |
least_squares | Least Squares |
lobpcg | |
norm | Norm of vectors |
operator | Linear operator algebra |
opnorm | Operator norm |
qr | QR decomposition |
solve | Solve systems of linear equations and invert matrices |
solveh | Solve Hermitian (or real symmetric) linear problems and invert Hermitian (or real symmetric) matrices |
svd | Singular-value decomposition (SVD) |
svddc | Singular-value decomposition (SVD) by divide-and-conquer (?gesdd) |
trace | Trace calculation |
triangular | Methods for triangular matrices |
tridiagonal | Vectors as a Tridiagonal matrix & Methods for tridiagonal matrices |
types | Basic types and their methods for linear algebra |
Macros
assert_aclose | |
assert_close_l1 | |
assert_close_l2 | |
assert_close_max | |
assert_rclose |
Structs
TruncatedEig | Truncated eigenproblem solver |
TruncatedSvd | Truncated singular value decomposition |
Enums
TruncatedOrder | Find largest or smallest eigenvalues |