diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c1734fe..54e7c0fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,41 @@ documented here. This project adheres to [Semantic Versioning](https://semver.org/). +## [0.26.0] +This releases integrates `min-const-generics` to nalgebra. See +[our blog post](https://dimforge.com/blog/2021/04/12/nalgebra-const-generics) +for details about this release. + +### Added +- Add type aliases for unit vector, e.g., `UnitVector3`. +- Add a `pow` and `pow_mut` function to square matrices. +- Add `Cholesky::determinant` to compute the determinant of a matrix decomposed + with Cholesky. +- Add the `serde-serialize-no-std` feature to enable serialization of static matrices/vectors + with serde, but without requiring `std`. + + +### Modified +- The `serde` crate isn't enabled by default now. Enable the `serde-serialize` or the + `serde-serialize-no-std` features instead. +- The `Const` type has been introduced to represent dimensions known + at compile-time. This replaces the type-level integers from `typenum` as well as + the `U1, U2, ..., U127` types from `nalgebra`. These `U1, U2, ..., U127` are now + just aliases for `Const`, e.g., `type U2 = Const<2>`. +- The `ArrayStorage` now uses a standard array `[[T; R]; C]` instead of a `GenericArray`. +- Many trait bounds were changed to accommodate const-generics. Most of these changes + should be transparent wrt. non-generic code. +- The `MatrixMN` alias has been deprecated. Use `OMatrix` or `SMatrix` instead. +- The `MatrixN` alias has been deprecated. Use `OMatrix` or `SMatrix` instead. +- The `VectorN` alias has been deprecated. Use `OVector` or `SVector` instead. +- The `Point`, `Translation`, `Isometry`, `Similarity`, and `Transformation` types now take an + integer for their dimension (instead of a type-level integer). +- The type parameter order of `Isometry`, `Similarity`, `Transformation` changed to put + the integer dimensions in the last position (this is required by the compiler). +- The `::new` constructors of translations, points, matrices, and vectors of dimensions `<= 6` + are now `const fn`, making them usable to define constant globals. The `Quaternion::new` + constructor is also a `const fn` now. + ## [0.25.4] ### Fixed - Fix a compilation error when only the `serde-serialize` feature is enabled. diff --git a/Cargo.toml b/Cargo.toml index 0a7e463f..3bab7b93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nalgebra" -version = "0.25.4" +version = "0.26.0" authors = [ "Sébastien Crozet " ] description = "General-purpose linear algebra library with transformations and statically-sized or dynamically-sized matrices." diff --git a/examples/cargo/Cargo.toml b/examples/cargo/Cargo.toml index 91b9b72b..10bcf375 100644 --- a/examples/cargo/Cargo.toml +++ b/examples/cargo/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.0" authors = [ "You" ] [dependencies] -nalgebra = "0.21.0" +nalgebra = "0.26.0" [[bin]] name = "example" diff --git a/nalgebra-glm/Cargo.toml b/nalgebra-glm/Cargo.toml index c67ec9bf..0d8b5bd8 100644 --- a/nalgebra-glm/Cargo.toml +++ b/nalgebra-glm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nalgebra-glm" -version = "0.11.0" +version = "0.12.0" authors = ["sebcrozet "] description = "A computer-graphics oriented API for nalgebra, inspired by the C++ GLM library." @@ -27,4 +27,4 @@ abomonation-serialize = [ "nalgebra/abomonation-serialize" ] num-traits = { version = "0.2", default-features = false } approx = { version = "0.4", default-features = false } simba = { version = "0.4", default-features = false } -nalgebra = { path = "..", version = "0.25", default-features = false } +nalgebra = { path = "..", version = "0.26", default-features = false } diff --git a/nalgebra-lapack/Cargo.toml b/nalgebra-lapack/Cargo.toml index fb6516ed..45a469ac 100644 --- a/nalgebra-lapack/Cargo.toml +++ b/nalgebra-lapack/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nalgebra-lapack" -version = "0.16.0" +version = "0.17.0" authors = [ "Sébastien Crozet ", "Andrew Straw " ] description = "Matrix decompositions using nalgebra matrices and Lapack bindings." @@ -29,7 +29,7 @@ accelerate = ["lapack-src/accelerate"] intel-mkl = ["lapack-src/intel-mkl"] [dependencies] -nalgebra = { version = "0.25", path = ".." } +nalgebra = { version = "0.26", path = ".." } num-traits = "0.2" num-complex = { version = "0.3", default-features = false } simba = "0.4" @@ -39,7 +39,7 @@ lapack-src = { version = "0.6", default-features = false } # clippy = "*" [dev-dependencies] -nalgebra = { version = "0.25", features = [ "arbitrary", "rand" ], path = ".." } +nalgebra = { version = "0.26", features = [ "arbitrary", "rand" ], path = ".." } proptest = { version = "1", default-features = false, features = ["std"] } quickcheck = "1" approx = "0.4" diff --git a/nalgebra-sparse/Cargo.toml b/nalgebra-sparse/Cargo.toml index f58be6e6..36dc8f30 100644 --- a/nalgebra-sparse/Cargo.toml +++ b/nalgebra-sparse/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nalgebra-sparse" -version = "0.1.0" +version = "0.2.0" authors = [ "Andreas Longva", "Sébastien Crozet " ] edition = "2018" description = "Sparse matrix computation based on nalgebra." @@ -20,7 +20,7 @@ compare = [ "matrixcompare-core" ] slow-tests = [] [dependencies] -nalgebra = { version="0.25", path = "../" } +nalgebra = { version="0.26", path = "../" } num-traits = { version = "0.2", default-features = false } proptest = { version = "1.0", optional = true } matrixcompare-core = { version = "0.1.0", optional = true } @@ -28,7 +28,7 @@ matrixcompare-core = { version = "0.1.0", optional = true } [dev-dependencies] itertools = "0.10" matrixcompare = { version = "0.2.0", features = [ "proptest-support" ] } -nalgebra = { version="0.25", path = "../", features = ["compare"] } +nalgebra = { version="0.26", path = "../", features = ["compare"] } [package.metadata.docs.rs] # Enable certain features when building docs for docs.rs diff --git a/src/base/indexing.rs b/src/base/indexing.rs index 17fd1f66..3e0c085e 100644 --- a/src/base/indexing.rs +++ b/src/base/indexing.rs @@ -7,7 +7,7 @@ use crate::base::{ use std::ops; -// T.B.: Not a public trait! +// N.B.: Not a public trait! trait DimRange { /// The number of elements indexed by this range. type Length: Dim;