Skip to content

Commit bbd956a

Browse files
authored
Feature/colpiv qr in nalgebra lapack (#1551)
* start implementation of col piv qr with lapack * implement basic decomposition * keep on keeping on * add triangular solve API * add permutation tests * start with rank estimation strategies * better rank calculation algorithms * implement owned solver API * add test for solving * fix error in lapack diag character conversion * fix test for equality * tests for rank deficient problems * add some comments * remove some rambling comments * add more tests, permutations are inverted I think * fix tests for qr decomposition * refactor permutation interface to require less allocations * add comments * add test helper for max diagonal matrix * add tests for q matrix * refactor q multiplication interface * change q multiplication interface, more changes incoming * fix dimensions for q multiplication and add test * remove some superfluous trait bounds * remove tests for underdetermined rank with qr * stricter assertions, fix compiler warnings * factor our error, fix warnings * start with adding proptest module for colpiv qr * Qr->QR naming consistent with nalgebra * bump lapack and lapack-src versions * fmt * add basic proptests for qr decomposition * fmt * test Q^T Q = Id * fix proptest compile * change col permutation logic and test normal equations for matrix solve test * fix borked permutation logic' * dynamic linear system proptests * move strategy back to my module * remove unused imports * add documentation, change solver signature slightly * fix comments, replace unwrap error handling * make col piv qr public so that it can be used from other crates * properly expose the unsafety in the lapack backend * split changelogs as discussed with sebcrozet * replace unsafe traits with sealed traits * remove outdated links * documentation overhaul, lapack-src updates, better selection of lapack features * add extern crate back, fix num accuracy in tests for mkl * fix wrong sign in complex conjugate (a + ib)* = a - ib * migrate complex eigen tests to use proptest for more exhaustive testing * update changelog * update changelog again * fmt changes in docs
1 parent e3bb6b7 commit bbd956a

17 files changed

Lines changed: 1941 additions & 101 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ documented here.
55

66
This project adheres to [Semantic Versioning](https://semver.org/).
77

8+
**nalgebra-lapack change log** is found [here](https://github.com/dimforge/nalgebra/blob/main/nalgebra-lapack/CHANGELOG.md)
9+
starting with `nalgebra-lapack` version `0.27.0`.
10+
811
## [0.34.1] (20 Sept. 2025)
912

1013
### Added

nalgebra-lapack/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Change Log
22

3+
For the **changes between versions 0.4.0 and 0.27.0** see the main
4+
[nalgebra change log](https://github.com/dimforge/nalgebra/blob/main/CHANGELOG.md).
5+
6+
## Unreleased
7+
8+
* bugfixes in Schur decomposition
9+
* bugfixes in LU decomposition
10+
* fix failing tests for Cholesky decomposition
11+
* fix compilation with `serde-serialize` feature enabled
12+
* add column-pivoting QR decomposition and solver
13+
* fix logic error in calculation of complex eigenvalues in eigen-decomposition.
14+
* change the feature flags for choosing the lapack backend, update docs accordingly
15+
316
## [0.4.0] - 2016-09-07
417

518
* Made all traits use associated types for their output type parameters. This

nalgebra-lapack/Cargo.toml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ version = "0.26.0"
44
authors = ["Sébastien Crozet <developer@crozet.re>", "Andrew Straw <strawman@astraw.com>"]
55

66
description = "Matrix decompositions using nalgebra matrices and Lapack bindings."
7-
documentation = "https://www.nalgebra.rs/docs"
87
homepage = "https://nalgebra.rs"
98
repository = "https://github.com/dimforge/nalgebra"
109
readme = "../README.md"
@@ -17,26 +16,32 @@ edition = "2024"
1716
maintenance = { status = "actively-developed" }
1817

1918
[features]
19+
default = ["lapack-netlib"]
2020
serde-serialize = ["serde", "nalgebra/serde-serialize"]
2121
proptest-support = ["nalgebra/proptest-support"]
2222
arbitrary = ["nalgebra/arbitrary"]
2323
slow-tests = []
2424

2525
# For BLAS/LAPACK
26-
default = ["netlib"]
27-
openblas = ["lapack-src/openblas"]
28-
netlib = ["lapack-src/netlib"]
29-
accelerate = ["lapack-src/accelerate"]
30-
intel-mkl = ["lapack-src/intel-mkl"]
26+
lapack-openblas = ["lapack-src/openblas"]
27+
lapack-netlib = ["lapack-src/netlib"]
28+
lapack-accelerate = ["lapack-src/accelerate"]
29+
lapack-mkl = ["lapack-mkl-static-seq"]
30+
lapack-mkl-static-seq = ["lapack-src/intel-mkl-static-sequential"]
31+
lapack-mkl-static-par = ["lapack-src/intel-mkl-static-parallel"]
32+
lapack-mkl-dynamic-seq = ["lapack-src/intel-mkl-dynamic-sequential"]
33+
lapack-mkl-dynamic-par = ["lapack-src/intel-mkl-dynamic-parallel"]
34+
lapack-custom = []
3135

3236
[dependencies]
3337
nalgebra = { version = "0.34", path = ".." }
3438
num-traits = "0.2"
3539
num-complex = { version = "0.4", default-features = false }
3640
simba = "0.9"
3741
serde = { version = "1.0", features = ["derive"], optional = true }
38-
lapack = { version = "0.19", default-features = false }
39-
lapack-src = { version = "0.8", default-features = false }
42+
lapack = { version = "0.20", default-features = false }
43+
lapack-src = { version = "0.13", optional = true}
44+
thiserror = "1.0"
4045
# clippy = "*"
4146

4247
[dev-dependencies]
@@ -45,4 +50,3 @@ proptest = { version = "1", default-features = false, features = ["std"] }
4550
quickcheck = "1"
4651
approx = "0.5"
4752
rand = "0.8"
48-

0 commit comments

Comments
 (0)