-
-
Notifications
You must be signed in to change notification settings - Fork 529
Description
Please, I would prefer that nobody make announcements on blogs about this (in reddit, hackernews, etc.) before the release on crates.io which will occur during the second half of august.
All the following are currently implemented on the linalg branch of nalgebra.
Since the last large release #218 of nalgebra, I've been working slowly but thoroughly on a few features that makes a step toward making nalgebra more useful for general-purpose linear algebra. This includes three major features:
- Pure-rust implementations of some the most common matrix factorization.
- Partial integration of Lapack. This is based on previous works on the nalgebra-lapack crate (made by @astraw).
- Insertion and removal of rows and columns to matrices.
Of course, all those work on statically-sized matrices as well as dynamically-sized matrices!
I alsow want to note that none of this would have been possible without the amazing typenum crate which allows addition/subtraction/minimum of type-level integers.
Matrix factorizations
This new version of nalgebra will include pure-rust implementations of the following factorization for real matrices ("general matrices" designates real-valued matrices that may be rectangular):
- Cholesky decomposition of symmetric definite-positive matrices (+ inverse, square linear system resolution).
- Hessenberg decomposition of square matrices.
- LU decompostion of general matrices with partial pivoting (+ inversion, determinant, square linear system resolution).
- LU decompostion of general matrices with full pivoting (+ inversion, determinant, square linear system resolution).
- QR decomposition of general matrices (+ inverse, square linear system resolution).
- Real Schur decomposition of general matrices (+ eigenvalues, complex eigenvalues).
- Eigendecomposition of symmetric matrices.
- Singular Value Decomposition (SVD) of general matrices (+ pseudo-inverse, linear system resolution, rank).
All those are implemented in the linalg folder. Note that as far as I know, the only other crate that implements those factorization in pure-Rust is rulinalg written by @AtheMathmo and @Andlon. Refer to the next post for benchmarks showing the performances of nalgebra compared to rulinalg.
Lapack integration
I'd like to move the nalgebra-lapack crate to the main nalgebra github repository to simplify the task of keeping them in sync. The next nalgebra-lapack version has been updated and I intend to make it contain at least all the decompositions implemented in Rust and expose similar interfaces to the user. It is not finished. Currently, it contains: Cholesky, Hessenberg, LU, QR, Eigendecomposition of real matrices, SVD.
Matrix edition
This adds the ability to resize a matrix or insert/remove rows and columns. For dynamically-sized matrices (allocated on the heap), the pre-existing buffer is reallocated (i.e. the underlying Vec is shrink or expanded.)
The ability to fill different parts of the matrices are added as well:
- Fill the lower/upper triangular part with a constant.
- Fill the matrix with the identity matrix.
- Fill the diagonal with a constant.
- Fill a row or column with a constant.
- Fill the lower-triangular (resp. upper-triangular) part of the matrix with the content of its upper-triangular (resp. lower-triangular) part to make the matrix symmetric.
Patreon
As a side note, I discovered Patreon only recently so I set up a page for my projects: https://www.patreon.com/sebcrozet Any financial aid is greatly appreciated.
Release date
The release is planed for the second half of august. Indeed, I still have to write documentations (including a new page on the nagebra users guide) and refine the API. Any feedback before the release would be very useful to improve the quality of the actual release.