1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Pure-Rust BLAS and LAPACK.
//!
//! # Layout and conventions
//!
//! * Matrices are column-major, so element `(i, j)` of an `nrow`-row matrix is at
//! `data[i + j * nrow]`.
//! * Indices are 0-based and lengths are `usize`, unlike the Fortran the routines
//! are derived from (`BLAS`/`LAPACK` are 1-based and take workspace arguments
//! that are an artifact of being written in Fortran, not part of the math).
//! * Nothing takes a workspace argument. The point of a Rust implementation is
//! that workspace can be allocated internally.
//!
//! # Provenance and verification
//!
//! Each routine names the LAPACK 3.12.1 source it follows, so it can be checked
//! against the reference. Correctness is tested for parity against the reference
//! LAPACK where the environment provides it (the `dev_lapack` feature, a
//! development-only harness), and against closed-form results otherwise; see the
//! tests in each module.
//!
//! The routines here are derived from LAPACK and reference BLAS, which are
//! BSD-3-Clause; see `LICENSE` for their copyright notices and this crate's
//! licence.
pub
pub
pub use Complex64;
/// Builds a [`Complex64`] from its real and imaginary parts.
///
/// ```
/// use algebra_linear::{cpx, Complex64};
/// let z = cpx!(1.0, 2.0);
/// assert_eq!(z, Complex64::new(1.0, 2.0));
/// ```