From e8b9c40123708180ad7714e9c709fe37ee306714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sun, 2 Jan 2022 15:30:05 +0100 Subject: [PATCH] Release v0.30.0 --- CHANGELOG.md | 24 ++++++++++++++++++++++-- Cargo.toml | 6 ++---- Makefile | 12 ------------ README.md | 14 +++++++++++--- examples/cargo/Cargo.toml | 2 +- nalgebra-glm/Cargo.toml | 6 +++--- nalgebra-lapack/Cargo.toml | 8 ++++---- nalgebra-lapack/src/eigen.rs | 4 ++-- nalgebra-lapack/src/schur.rs | 2 +- nalgebra-lapack/src/symmetric_eigen.rs | 4 ++-- nalgebra-macros/Cargo.toml | 2 +- nalgebra-sparse/Cargo.toml | 6 +++--- 12 files changed, 52 insertions(+), 38 deletions(-) delete mode 100644 Makefile diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b4958a..88006c2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,21 @@ documented here. This project adheres to [Semantic Versioning](https://semver.org/). -## [0.30.0] +## [0.30.0] (02 Jan. 2022) ### Breaking changes - The `Dim` trait is now marked as unsafe. +- The `Matrix::pow` and `Matrix::pow_mut` methods only allow positive integer exponents now. To compute negative + exponents, the user is free to invert the matrix before calling `pow` with the exponent’s absolute value. ### Modified - Use more concise debug impls for matrices and geometric transformation types. +- The singular values computed by the SVD are now sorted in increasing order by default. Use `SVD::new_unordered` + instead to reproduce the older behavior without the sorting overhead. +- The `UnitDualQuaternion::sclerp` method will no longer panic when given two equal rotations. +- The `Matrix::select_rows` and `Matrix::select_columns` methods no longer require the matrix components to implement + the trait `Zero`. +- The `Matrix::pow` and `Matrix::pow_mut` methods will now also work with integer matrices. ### Added - Added the conversion trait `From>` and method `from_vec_storage` for `RowDVector`. @@ -21,14 +29,26 @@ This project adheres to [Semantic Versioning](https://semver.org/). - The `Default` trait is now implemented for most geometric types: `Point`, `Isometry`, `Rotation`, `Similarity`, `Transform`, `UnitComplex`, and `UnitQuaternion`. - Added the `Scale` geometric type for representing non-uniform scaling. -- `nalgebra-sparse`: provide constructors for unsorted but otherwise valid data using the CSR format. - Added `Cholesky::new_with_substitute` that will replace diagonal elements by a given constant whenever `Cholesky` meets a non-definite-positiveness. +- Re-added the conversion from a vector/matrix slice to a static array. +- Added the `cuda` feature that enables the support of [rust-cuda](https://github.com/Rust-GPU/Rust-CUDA) for using + `nalgebra` features with CUDA kernels written in Rust. +- Added special-cases implementations for the 2x2 and 3x3 SVDs for better accuracy and performances. +- Added the methods `Matrix::polar`, `Matrix::try_polar`, and `SVD::to_polar` to compute the polar decomposition of + a matrix, based on its SVD. +- `nalgebra-sparse`: provide constructors for unsorted but otherwise valid data using the CSR format. +- `nalgebra-sparse`: added reading MatrixMarked data files to a sparse `CooMatrix`. ### Fixed - Fixed a potential unsoundness with `matrix.get(i)` and `matrix.get_mut(i)` where `i` is an `usize`, and `matrix` is a matrix slice with non-default strides. - Fixed potential unsoundness with `vector.perp` where `vector` isn’t actually a 2D vector as expected. +- Fixed linkage issue with `nalgebra-lapack`: the user of `nalgebra-lapack` no longer have to add + `extern crate lapack-src` to their `main.rs`. +- Fixed the `no-std` build of `nalgebra-glm`. +- Fix the `pow` and `pow_mut` functions (the result was incorrect for some exponent values). + ## [0.29.0] ### Breaking changes diff --git a/Cargo.toml b/Cargo.toml index 25d98ac4..8294398e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nalgebra" -version = "0.29.0" +version = "0.30.0" authors = [ "Sébastien Crozet " ] description = "General-purpose linear algebra library with transformations and statically-sized or dynamically-sized matrices." @@ -74,7 +74,7 @@ num-traits = { version = "0.2", default-features = false } num-complex = { version = "0.4", default-features = false } num-rational = { version = "0.4", default-features = false } approx = { version = "0.5", default-features = false } -simba = { version = "0.6", default-features = false } +simba = { version = "0.7", default-features = false } alga = { version = "0.9", default-features = false, optional = true } rand_distr = { version = "0.4", default-features = false, optional = true } matrixmultiply = { version = "0.3", optional = true } @@ -134,5 +134,3 @@ lto = true # Enable certain features when building docs for docs.rs features = [ "proptest-support", "compare", "macros", "rand" ] -[patch.crates-io] -simba = { git = "https://github.com/dimforge/simba"} diff --git a/Makefile b/Makefile deleted file mode 100644 index 0af9f3f2..00000000 --- a/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -all: - cargo test --features "debug arbitrary serde-serialize abomonation-serialize compare" - # cargo check --features "debug arbitrary serde-serialize" - -doc: - cargo doc --no-deps --features "debug arbitrary serde-serialize abomonation" - -bench: - cargo bench - -test: - cargo test --features "debug arbitrary serde-serialize abomonation-serialize compare" diff --git a/README.md b/README.md index 842c3c7f..fa1e0904 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,18 @@ ----- -## Platinum sponsors -Rapier is supported by: +## Acknowledgements +nalgebra is supported by our **platinum** sponsors:

- +

+ +And our gold sponsors: + +

+ + + +

\ No newline at end of file diff --git a/examples/cargo/Cargo.toml b/examples/cargo/Cargo.toml index 454c88b0..501ae23e 100644 --- a/examples/cargo/Cargo.toml +++ b/examples/cargo/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.0" authors = [ "You" ] [dependencies] -nalgebra = "0.29.0" +nalgebra = "0.30.0" [[bin]] name = "example" diff --git a/nalgebra-glm/Cargo.toml b/nalgebra-glm/Cargo.toml index cfe83bdc..287bb8c7 100644 --- a/nalgebra-glm/Cargo.toml +++ b/nalgebra-glm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nalgebra-glm" -version = "0.15.0" +version = "0.16.0" authors = ["sebcrozet "] description = "A computer-graphics oriented API for nalgebra, inspired by the C++ GLM library." @@ -37,5 +37,5 @@ convert-glam018 = [ "nalgebra/glam018" ] [dependencies] num-traits = { version = "0.2", default-features = false } approx = { version = "0.5", default-features = false } -simba = { version = "0.6", default-features = false } -nalgebra = { path = "..", version = "0.29", default-features = false } +simba = { version = "0.7", default-features = false } +nalgebra = { path = "..", version = "0.30", default-features = false } diff --git a/nalgebra-lapack/Cargo.toml b/nalgebra-lapack/Cargo.toml index b7f296f0..7cdf9f78 100644 --- a/nalgebra-lapack/Cargo.toml +++ b/nalgebra-lapack/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nalgebra-lapack" -version = "0.20.0" +version = "0.21.0" authors = [ "Sébastien Crozet ", "Andrew Straw " ] description = "Matrix decompositions using nalgebra matrices and Lapack bindings." @@ -29,17 +29,17 @@ accelerate = ["lapack-src/accelerate"] intel-mkl = ["lapack-src/intel-mkl"] [dependencies] -nalgebra = { version = "0.29", path = ".." } +nalgebra = { version = "0.30", path = ".." } num-traits = "0.2" num-complex = { version = "0.4", default-features = false } -simba = "0.5" +simba = "0.7" serde = { version = "1.0", features = [ "derive" ], optional = true } lapack = { version = "0.19", default-features = false } lapack-src = { version = "0.8", default-features = false } # clippy = "*" [dev-dependencies] -nalgebra = { version = "0.29", features = [ "arbitrary", "rand" ], path = ".." } +nalgebra = { version = "0.30", features = [ "arbitrary", "rand" ], path = ".." } proptest = { version = "1", default-features = false, features = ["std"] } quickcheck = "1" approx = "0.5" diff --git a/nalgebra-lapack/src/eigen.rs b/nalgebra-lapack/src/eigen.rs index f6628bfe..8eab62d8 100644 --- a/nalgebra-lapack/src/eigen.rs +++ b/nalgebra-lapack/src/eigen.rs @@ -294,7 +294,7 @@ where let mut res = Matrix::zeros_generic(nrows, Const::<1>); for i in 0..res.len() { - res[i] = Complex::new(wr[i], wi[i]); + res[i] = Complex::new(wr[i].clone(), wi[i].clone()); } res @@ -306,7 +306,7 @@ where pub fn determinant(&self) -> T { let mut det = T::one(); for e in self.eigenvalues.iter() { - det *= *e; + det *= e.clone(); } det diff --git a/nalgebra-lapack/src/schur.rs b/nalgebra-lapack/src/schur.rs index 13dfc05e..52f5dced 100644 --- a/nalgebra-lapack/src/schur.rs +++ b/nalgebra-lapack/src/schur.rs @@ -155,7 +155,7 @@ where let mut out = Matrix::zeros_generic(self.t.shape_generic().0, Const::<1>); for i in 0..out.len() { - out[i] = Complex::new(self.re[i], self.im[i]) + out[i] = Complex::new(self.re[i].clone(), self.im[i].clone()) } out diff --git a/nalgebra-lapack/src/symmetric_eigen.rs b/nalgebra-lapack/src/symmetric_eigen.rs index 8cbe63f8..0a4b09ce 100644 --- a/nalgebra-lapack/src/symmetric_eigen.rs +++ b/nalgebra-lapack/src/symmetric_eigen.rs @@ -140,7 +140,7 @@ where pub fn determinant(&self) -> T { let mut det = T::one(); for e in self.eigenvalues.iter() { - det *= *e; + det *= e.clone(); } det @@ -153,7 +153,7 @@ where pub fn recompose(&self) -> OMatrix { let mut u_t = self.eigenvectors.clone(); for i in 0..self.eigenvalues.len() { - let val = self.eigenvalues[i]; + let val = self.eigenvalues[i].clone(); u_t.column_mut(i).mul_assign(val); } u_t.transpose_mut(); diff --git a/nalgebra-macros/Cargo.toml b/nalgebra-macros/Cargo.toml index f77fc32e..bd37b689 100644 --- a/nalgebra-macros/Cargo.toml +++ b/nalgebra-macros/Cargo.toml @@ -21,5 +21,5 @@ quote = "1.0" proc-macro2 = "1.0" [dev-dependencies] -nalgebra = { version = "0.29.0", path = ".." } +nalgebra = { version = "0.30.0", path = ".." } trybuild = "1.0.42" diff --git a/nalgebra-sparse/Cargo.toml b/nalgebra-sparse/Cargo.toml index 7692984e..6f7a7b4a 100644 --- a/nalgebra-sparse/Cargo.toml +++ b/nalgebra-sparse/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nalgebra-sparse" -version = "0.5.0" +version = "0.6.0" authors = [ "Andreas Longva", "Sébastien Crozet " ] edition = "2018" description = "Sparse matrix computation based on nalgebra." @@ -23,7 +23,7 @@ io = [ "pest", "pest_derive" ] slow-tests = [] [dependencies] -nalgebra = { version="0.29", path = "../" } +nalgebra = { version="0.30", path = "../" } num-traits = { version = "0.2", default-features = false } proptest = { version = "1.0", optional = true } matrixcompare-core = { version = "0.1.0", optional = true } @@ -33,7 +33,7 @@ pest_derive = { version = "2", optional = true } [dev-dependencies] itertools = "0.10" matrixcompare = { version = "0.3.0", features = [ "proptest-support" ] } -nalgebra = { version="0.29", path = "../", features = ["compare"] } +nalgebra = { version="0.30", path = "../", features = ["compare"] } [package.metadata.docs.rs] # Enable certain features when building docs for docs.rs