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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
//! # nalgebra-lapack
//!
//! Rust library for linear algebra using nalgebra and LAPACK.
//!
//! ## Selecting a LAPACK Backend
//!
//! This crate uses [cargo features](https://doc.crates.io/manifest.html#the-[features]-section)
//! to select which lapack provider (or implementation) is used.
//!
//! ### Default LAPACK Backend and Performance
//!
//! By default, the [`lapack-src`](https://crates.io/crates/lapack-src) crate
//! is used as a LAPACK source, which bundles netlib and works out of the box,
//! given an existing FORTRAN compiler on your system. That makes this choice
//! practical, but it's typically not the best performing backend.
//!
//! ### LAPACK Backends
//!
//! LAPACK backends other than `lapack-netlib` typically assume the libraries or
//! frameworks are present on your system. See the respective vendors how to
//! install them. Backends are selected using one of the `lapack-*` feature flags:
//!
//! * `lapack-netlib`: use the bundled [Netlib](http://www.netlib.org/) reference
//! implementation. This feature is enabled by default.
//! * `lapack-openblas`: Use LAPACK provided via [OpenBLAS](http://www.openmathlib.org/OpenBLAS/).
//! * `lapack-accelerate`: Use Apple's [Accelerate](https://developer.apple.com/documentation/accelerate)
//! framework.
//! * `lapack-mkl`: alias for `lapack-mkl-static-seq`. A useful default for [Intel MKL](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html).
//! * `lapack-mkl-static-seq`: statically link the _sequential_ version of MKL.
//! * `lapack-mkl-static-par`: statically link the _parallel_ version of MKL.
//! * `lapack-mkl-dynamic-seq`: dynamically link the sequential version of MKL.
//! * `lapack-mkl-dynamic-par`: dynamically link the parallel version of MKL.
//! * `lapack-custom`: Use a custom LAPACK backend whose functions must be
//! available at link time. It is your responsibility to make sure those are
//! ABI compatible with the function signatures in the [lapack](https://crates.io/crates/lapack)
//! crate.
//!
//! Note that **exactly one** of these features must be selected
//! and that `lapack-netlib` is selected by default, which means **you have
//! to disable default features** when explicitly specifying a LAPACK backend.
//!
//! ```toml
//! nalgebra-lapack = { version = "*", default-features = false, features = ["lapack-*"] }
//! ```
//!
//! [version-img]: https://img.shields.io/crates/v/nalgebra-lapack.svg
//! [version-url]: https://crates.io/crates/nalgebra-lapack
//! [doc-img]: https://docs.rs/nalgebra-lapack/badge.svg
//! [doc-url]: https://docs.rs/nalgebra-lapack/
//!
//! ## Performance
//!
//! As always, there's only one way to find out if nalgebra-lapack brings
//! a performance benefit to your project, which is _measuring_. The same
//! goes for deciding which LAPACK backend to use, if you have multiple available
//! options.
//!
//! ## License
//!
//! MIT
//!
//!
//! ## Contributors
//! This integration of LAPACK with nalgebra was
//! [initiated](https://github.com/strawlab/nalgebra-lapack) by Andrew Straw. It
//! then became officially supported and integrated into the main nalgebra
//! repository.
// A utility macro that makes sure that exactly one of the LAPACK backend
// features is selected. It provides helpful error messages otherwise.
// If you hit a compile error here, make sure to specify exactly one of the
// available `lapack-*` features in this crate.
//
// # Troubleshooting
//
// ## Multiple Features Selected!
//
// By default, the `lapack-netlib`
// backend is specified, so to select another backend, you have to disable
// the default features of this crate when including this crate.
//
// ## Select At Least One Feature!
//
// If you want to use a custom backend at link time, turn off default features
// and use `lapack-custom`.
enforce_exactly_one_feature_selected!;
extern crate lapack;
extern crate lapack_src;
extern crate nalgebra as na;
extern crate num_traits as num;
/// Column-pivoted QR decomposition of a rectangular (or square) matrix.
/// QR decomposition of a rectangular (or square) matrix.
/// Internal utility module that contains functionality that is useful for
/// both column-pivoted and non-pivoted QR decomposition.
use Complex;
/// Utility module that defines some common terms that LAPACK uses.
/// Utility module for LAPACK error codes and error checking.
pub use LapackErrorCode;
pub use DiagonalKind;
pub use Side;
pub use Transposition;
pub use TriangularStructure;
pub use ;
pub use ColPivQR;
pub use Eigen;
pub use GeneralizedEigen;
pub use Hessenberg;
pub use ;
pub use QR;
pub use QrDecomposition;
pub use QZ;
pub use Schur;
pub use SVD;
pub use SymmetricEigen;