Crate ndarray_linalg [−] [src]
Linear algebra package for rust-ndarray using LAPACK via stainless-steel/lapack
Linear algebra methods
- QR decomposition
- singular value decomposition
- solve linear problem
- solve linear problem for triangular matrix
- inverse matrix
- eigenvalue decomposition for Hermite matrix
Utilities
Usage
Most functions in this crate is defined as self-consuming trait technique like serde does.
For example, we can execute eigh using three types of interfaces:
let a = random((3, 3)); let (eval, evec) = a.eigh(UPLO::Upper)?; let (eval, evec) = (&a).eigh(UPLO::Upper)?; let (eval, evec) = (&mut a).eigh(UPLO::Upper)?;
The first type a.eigh()
consumes a
, and the memory of a
is used for evec
.
The second type (&a).eigh()
consumes the reference (not a
itself),
and the memory for evec
is newly allocated.
The last one (&mut a).eigh()
is similar to the first one;
It borrows a
mutably, and rewrite it to contains evec
.
In all cases, the array eval
is newly allocated.
Reexports
pub use assert::*; |
pub use generate::*; |
pub use layout::*; |
pub use types::*; |
pub use cholesky::*; |
pub use eigh::*; |
pub use norm::*; |
pub use opnorm::*; |
pub use qr::*; |
pub use solve::*; |
pub use svd::*; |
pub use trace::*; |
pub use triangular::*; |
Modules
assert |
Assertions for array |
cholesky |
Cholesky decomposition |
eigh |
Eigenvalue decomposition for Hermite matrices |
error |
Define Errors |
generate |
Generator functions for matrices |
lapack_traits |
Define traits wrapping LAPACK routines |
layout |
Memory layout of matrices |
norm |
Norm of vectors |
opnorm |
Operator norm |
qr |
QR decomposition |
solve |
Solve linear problems |
svd |
singular-value decomposition |
trace |
Trace calculation |
triangular |
Methods for triangular matrices |
types |
Basic types and their methods for linear algebra |
Macros
assert_aclose | |
assert_close_l1 | |
assert_close_l2 | |
assert_close_max | |
assert_rclose |