# Crate ndarray_linalg [−] [src]

Linear algebra package for rust-ndarray using LAPACK via stainless-steel/lapack

## 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 cholesky::*;` `pub use convert::*;` `pub use diagonal::*;` `pub use eigh::*;` `pub use generate::*;` `pub use layout::*;` `pub use norm::*;` `pub use operator::*;` `pub use opnorm::*;` `pub use qr::*;` `pub use solve::*;` `pub use svd::*;` `pub use trace::*;` `pub use triangular::*;` `pub use types::*;`

## Modules

 assert Assertions for array cholesky Cholesky decomposition convert utilities for convert array diagonal Vector as a Diagonal matrix 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 operator Linear Operator 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