nalgebra v0.30.0 Release Notes

Release Date: 2022-01-02 // over 2 years ago
  • πŸ’₯ 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.
    • βœ‚ Remove the Bounded requirement from RealField. Replace it by methods returning Option<Self> so that they can still be implemented by unbounded types (by returning None).
    • The ComplexField trait derives from FromPrimitive again. We can actually keep this because all its methods return Option<Self>, meaning that it could be implemented by any type.

    Modified

    • πŸ‘‰ Use more concise debug impls for matrices and geometric transformation types.
    • 0️⃣ 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<Vec<T>> and method from_vec_storage for RowDVector.
    • βž• Added implementation of From and Into for converting between nalgebra types and types from glam 0.18. These can be enabled by enabling the convert-glam018 cargo features.
    • Added the methods Matrix::product, ::row_product, ::row_product_tr, and ::column_product to compute the product of the components, rows, or columns, of a single matrix or vector.
    • 0️⃣ 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.
    • 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 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).