ndarray_linalg/
lib.rs

1//! The `ndarray-linalg` crate provides linear algebra functionalities for `ArrayBase`, the n-dimensional array data structure provided by [`ndarray`](https://github.com/rust-ndarray/ndarray).
2//!
3//! `ndarray-linalg` leverages [LAPACK](http://www.netlib.org/lapack/)'s routines using the bindings provided by [blas-lapack-rs/lapack](https://github.com/blas-lapack-rs/lapack).
4//!
5//! Linear algebra methods
6//! -----------------------
7//! - Decomposition methods:
8//!     - [QR decomposition](qr/index.html)
9//!     - [Cholesky/LU decomposition](cholesky/index.html)
10//!     - [Eigenvalue decomposition](eig/index.html)
11//!     - [Eigenvalue decomposition for Hermite matrices](eigh/index.html)
12//!     - [**S**ingular **V**alue **D**ecomposition](svd/index.html)
13//! - Solution of linear systems:
14//!    - [General matrices](solve/index.html)
15//!    - [Triangular matrices](triangular/index.html)
16//!    - [Hermitian/real symmetric matrices](solveh/index.html)
17//!    - [Tridiagonal matrices](tridiagonal/index.html)
18//! - [Inverse matrix computation](solve/trait.Inverse.html)
19//!
20//! Naming Convention
21//! -----------------------
22//! Each routine is usually exposed as a trait, implemented by the relevant types.
23//!
24//! For each routine there might be multiple "variants": different traits corresponding to the different ownership possibilities of the array you intend to work on.
25//!
26//! For example, if you are interested in the QR decomposition of a square matrix, you can use:
27//! - [QRSquare](qr/trait.QRSquare.html), if you hold an immutable reference (i.e. `&self`) to the matrix you want to decompose;
28//! - [QRSquareInplace](qr/trait.QRSquareInplace.html), if you hold a mutable reference (i.e. `&mut self`) to the matrix you want to decompose;
29//! - [QRSquareInto](qr/trait.QRSquareInto.html), if you can pass the matrix you want to decompose by value (e.g. `self`).
30//!
31//! Depending on the algorithm, each variant might require more or less copy operations of the underlying data.
32//!
33//! Details are provided in the description of each routine.
34//!
35//!  Utilities
36//!  -----------
37//!  - [Assertions for array](index.html#macros)
38//!  - [Random matrix generators](generate/index.html)
39//!  - [Scalar trait](types/trait.Scalar.html)
40
41#![allow(
42    clippy::module_inception,
43    clippy::many_single_char_names,
44    clippy::type_complexity,
45    clippy::ptr_arg
46)]
47#![deny(rustdoc::broken_intra_doc_links, rustdoc::private_intra_doc_links)]
48
49#[macro_use]
50extern crate ndarray;
51
52pub mod assert;
53pub mod cholesky;
54pub mod convert;
55pub mod diagonal;
56pub mod eig;
57pub mod eigh;
58pub mod error;
59pub mod generate;
60pub mod inner;
61pub mod krylov;
62pub mod layout;
63pub mod least_squares;
64pub mod lobpcg;
65pub mod norm;
66pub mod operator;
67pub mod opnorm;
68pub mod qr;
69pub mod solve;
70pub mod solveh;
71pub mod svd;
72pub mod svddc;
73pub mod trace;
74pub mod triangular;
75pub mod tridiagonal;
76pub mod types;
77
78pub use crate::assert::*;
79pub use crate::cholesky::*;
80pub use crate::convert::*;
81pub use crate::diagonal::*;
82pub use crate::eig::*;
83pub use crate::eigh::*;
84pub use crate::generate::*;
85pub use crate::inner::*;
86pub use crate::layout::*;
87pub use crate::least_squares::*;
88pub use crate::lobpcg::{TruncatedEig, TruncatedOrder, TruncatedSvd};
89pub use crate::norm::*;
90pub use crate::operator::*;
91pub use crate::opnorm::*;
92pub use crate::qr::*;
93pub use crate::solve::*;
94pub use crate::solveh::*;
95pub use crate::svd::*;
96pub use crate::svddc::*;
97pub use crate::trace::*;
98pub use crate::triangular::*;
99pub use crate::tridiagonal::*;
100pub use crate::types::*;