|
7 | 7 | //! - [solve linear problem](solve/index.html)
|
8 | 8 | //! - [solve linear problem for triangular matrix](triangular/trait.SolveTriangular.html)
|
9 | 9 | //! - [inverse matrix](solve/trait.Inverse.html)
|
10 |
| -//! - [eigenvalue decomposition for Hermite matrix](eigh/trait.Eigh.html) |
| 10 | +//! - [eigenvalue decomposition for Hermite matrix][eigh] |
11 | 11 | //!
|
12 |
| -//! Utilites |
| 12 | +//! [eigh]:eigh/trait.Eigh.html |
| 13 | +//! |
| 14 | +//! Utilities |
13 | 15 | //! -----------
|
14 | 16 | //! - [assertions for array](index.html#macros)
|
15 | 17 | //! - [generator functions](generate/index.html)
|
16 | 18 | //! - [Scalar trait](types/trait.Field.html)
|
| 19 | +//! |
| 20 | +//! Usage |
| 21 | +//! ------ |
| 22 | +//! Most functions in this crate is defined as [self-consuming trait technique][sct] like [serde] |
| 23 | +//! does. |
| 24 | +//! |
| 25 | +//! For example, we can execute [eigh][eigh] using three types of interfaces: |
| 26 | +//! |
| 27 | +//! ```rust |
| 28 | +//! let a = random((3, 3)); |
| 29 | +//! let (eval, evec) = a.eigh(UPLO::Upper)?; |
| 30 | +//! let (eval, evec) = (&a).eigh(UPLO::Upper)?; |
| 31 | +//! let (eval, evec) = (&mut a).eigh(UPLO::Upper)?; |
| 32 | +//! ``` |
| 33 | +//! |
| 34 | +//! The first type `a.eigh()` consumes `a`, and the memory of `a` is used for `evec`. |
| 35 | +//! The second type `(&a).eigh()` consumes the reference (not `a` itself), |
| 36 | +//! and the memory for `evec` is newly allocated. |
| 37 | +//! The last one `(&mut a).eigh()` is similar to the first one; |
| 38 | +//! It borrows `a` mutably, and rewrite it to contains `evec`. |
| 39 | +//! In all cases, the array `eval` is newly allocated. |
| 40 | +//! |
| 41 | +//! [sct]:https://github.com/serde-rs/serde/releases/tag/v0.9.0 |
| 42 | +//! [serde]:https://github.com/serde-rs/serde |
17 | 43 |
|
18 | 44 | extern crate blas;
|
19 | 45 | extern crate lapack;
|
|
0 commit comments