Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.27.0 #901

Merged
merged 70 commits into from Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
f70e7f7
Fix serialization of DVector
sebcrozet Apr 12, 2021
9e5e8e7
Merge pull request #870 from dimforge/dvector_serialize
sebcrozet Apr 12, 2021
3ec5701
Release v0.26.1
sebcrozet Apr 12, 2021
28bfb4a
Update Changelog.
sebcrozet Apr 12, 2021
984bb1a
Fix const-generics blog post url in the changelog.
sebcrozet Apr 12, 2021
43cf22a
Cleanup conversion between static arrays and static matrices.
sebcrozet Apr 27, 2021
09be376
Add more conversion for Isometry
sebcrozet Apr 27, 2021
db27a08
Cleanup conversions between points and static vectors.
sebcrozet Apr 27, 2021
65b94cc
Add more conversions for translations
sebcrozet Apr 27, 2021
d59d438
Add more conversion for glam types
sebcrozet Apr 27, 2021
0745384
Update changelog.
sebcrozet Apr 27, 2021
fb21476
Merge pull request #874 from dimforge/more_conversions
sebcrozet Apr 27, 2021
58bea21
Release v0.26.2
sebcrozet Apr 27, 2021
c5a44ec
Update criterion
vks Apr 12, 2021
209b476
Mark rand as required for benchmark
vks Apr 12, 2021
4bc62bc
Fix benchmarks
vks Apr 12, 2021
35b9634
Fix criterion warning
vks Apr 12, 2021
4387a7f
Use correct feature and remove unused import
vks Apr 29, 2021
105e894
add missing doc tests
chammika-become May 2, 2021
c420afd
CooMatrix::reserve added
chammika-become May 2, 2021
e8d0088
Merge pull request #884 from chammika-become/missing-doc-tests
sebcrozet May 2, 2021
e976922
Initial hacked together prototype without syn
Andlon Apr 11, 2021
ab95cf7
Initial impl using syn and quote
Andlon Apr 11, 2021
ed83350
Fix warnings, refactor code
Andlon Apr 11, 2021
1dccdb1
Exhaustive tests for small dimensions
Andlon Apr 12, 2021
e60136f
Update nalgebra-macros to nalgebra 0.26 and const generics
Andlon Apr 14, 2021
ec2a5a3
Construct ArrayStorage directly in matrix![]
Andlon Apr 17, 2021
7098a4f
Test that matrix![] can be used with const
Andlon Apr 17, 2021
9142dc8
Implement SMatrix::from_array_storage and use it in matriX! impl
Andlon Apr 17, 2021
d2c11ad
Impl DMatrix/DVector::from_vec_storage
Andlon Apr 17, 2021
5c84302
Implement dmatrix![] macro
Andlon Apr 29, 2021
d56db1a
Assert type in matrix/dmatrix tests
Andlon Apr 30, 2021
07d41e4
vector! and dvector! macros
Andlon Apr 30, 2021
da07749
Add trybuild tests to test error message reported when matrix dims mi…
Andlon Apr 30, 2021
b96c755
Document macros
Andlon Apr 30, 2021
eeab4db
Add nalgebra/macros feature and re-export matrix macros from nalgebra
Andlon Apr 30, 2021
0bde07f
Document that feature needs to be enabled, and require macros feature…
Andlon Apr 30, 2021
041b8c4
Add macro sanity tests to macros
Andlon Apr 30, 2021
08a77dd
Test nalgebra-macros on CI
Andlon Apr 30, 2021
8552fc8
Cargo fmt
Andlon May 3, 2021
5d638a3
correct all gramatical mistakes pointed by @Andlon
chammika-become May 4, 2021
f42ecf0
Improve nalgebra-macros/Cargo.toml metadata
Andlon May 5, 2021
57541aa
Add tests to ensure macros compile for all built-in types
Andlon May 5, 2021
6026a05
Test that matrix macros work with arbitrary expressions
Andlon May 5, 2021
39b275f
Formatting
Andlon May 5, 2021
5bff536
Manually implement Serialize and Deserialize for VecStorage
sebcrozet May 6, 2021
b398a5e
Re-add conversion between arrays and row vectors.
sebcrozet May 6, 2021
3a3bc55
Move from_{}_storage impl blocks to matrix.rs
Andlon May 7, 2021
922393b
Enable from_{}_storage only when std/alloc available
Andlon May 7, 2021
b85335b
Update matrixcompare version to 0.3.0
Andlon May 7, 2021
d268c4d
Merge pull request #892 from Andlon/update-matrixcompare
sebcrozet May 9, 2021
02614cb
Merge pull request #890 from dimforge/row_vector_array_convert
sebcrozet May 9, 2021
a803271
Merge pull request #889 from dimforge/dvector_deserialize
sebcrozet May 9, 2021
23ac85e
Merge pull request #886 from Andlon/matrix-macro
sebcrozet May 9, 2021
d67aec8
Merge pull request #885 from chammika-become/coo-reserve
sebcrozet May 9, 2021
511a515
Merge pull request #866 from vks/improve-bench
sebcrozet May 9, 2021
b48b104
Add rkyv implementations for a few types
djkoloski May 5, 2021
38dd334
Switch to distributive implementations
djkoloski May 7, 2021
9fff10b
Move rkyv impls into separate modules
djkoloski May 9, 2021
fb7c22f
Merge pull request #891 from djkoloski/dev
sebcrozet May 9, 2021
79ef862
Fix docs on csc_data(), csc_data_mut()
dfarnham May 9, 2021
f9a128a
Merge pull request #894 from dfarnham/dev
sebcrozet May 10, 2021
8810b85
Add a point! macro for construction points
sebcrozet May 24, 2021
d6d2a3e
Fix macros tests.
sebcrozet May 24, 2021
0490a84
Fix typo
sebcrozet May 24, 2021
ef3257b
Merge pull request #899 from dimforge/point_macro
sebcrozet May 25, 2021
4af979c
Support multiple version of the optional glam conversion
sebcrozet Jun 1, 2021
47a4f52
Replace unchecked glam conversion by TryFrom or checks
sebcrozet Jun 1, 2021
de705a8
Merge pull request #900 from dimforge/glam-multiversion
sebcrozet Jun 1, 2021
dfc8ad3
Release v0.27.0
sebcrozet Jun 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/nalgebra-ci-build.yml
Expand Up @@ -69,6 +69,12 @@ jobs:
- name: test nalgebra-sparse (slow tests)
# Unfortunately, the "slow-tests" take so much time that we need to run them with --release
run: PROPTEST_CASES=10000 cargo test --release --manifest-path=nalgebra-sparse/Cargo.toml --features compare,proptest-support,slow-tests slow
test-nalgebra-macros:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: test nalgebra-macros
run: cargo test -p nalgebra-macros
build-wasm:
runs-on: ubuntu-latest
# env:
Expand Down
31 changes: 30 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,9 +4,38 @@ documented here.

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

## [0.27.0]
This removes the `convert-glam` and `convert-glam-unchecked` optional features.
Instead, this adds the `convert-glam013`, `convert-glam014`, and `convert-glam015` optional features for
conversions targeting the versions 0.13, 0.14, and 0.15 of `glam`.

### Added
- Add macros `matrix!`, `dmatrix!`, `vector!`, `dvector!`, `point!` for constructing matrices/vectors/points in a
more convenient way. See [#886](https://github.com/dimforge/nalgebra/pull/886) and [#899](https://github.com/dimforge/nalgebra/pull/899).
- Add `CooMatrix::reserve` to `nalgebra-sparse`.
- Add basic support for serialization using `rkyv`. Can be enabled with the features `rkyv-serialize` or
`rkyv-serialize-no-std`.


### Fixed
- Fixed a potential unsoundness issue after deserializing an invalid `DVector` using `serde`.

## [0.26.2]
### Added
- Conversion from an array `[T; D]` to an isometry `Isometry<T, _, D>` (as a translation).
- Conversion from a static vector `SVector<T; D>` to an isometry `Isometry<T, _, D>` (as a translation).
- Conversion from a point `Point<T; D>` to an isometry `Isometry<T, _, D>` (as a translation).
- Conversion of an array `[T; D]` from/to a translation `Translation<T, D>`.
- Conversion of a point `Point<T, D>` to a translation `Translation<T, D>`.
- Conversion of the tuple of glam types `(Vec3, Quat)` from/to an `Isometry2` or `Isometry3`.
- Conversion of a glam type `Vec2/3/4` from/to a `Translation2/3/4`.

## [0.26.1]
Fix a regression introduced in 0.26.0 preventing `DVector` from being serialized with `serde`.

## [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)
[our blog post](https://www.dimforge.com/blog/2021/04/12/integrating-const-generics-to-nalgebra)
for details about this release.

### Added
Expand Down
38 changes: 24 additions & 14 deletions Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "nalgebra"
version = "0.26.0"
version = "0.27.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]

description = "General-purpose linear algebra library with transformations and statically-sized or dynamically-sized matrices."
Expand All @@ -22,7 +22,7 @@ name = "nalgebra"
path = "src/lib.rs"

[features]
default = [ "std" ]
default = [ "std", "macros" ]
std = [ "matrixmultiply", "simba/std" ]
sparse = [ ]
debug = [ "approx/num-complex", "rand" ]
Expand All @@ -32,12 +32,14 @@ compare = [ "matrixcompare-core" ]
libm = [ "simba/libm" ]
libm-force = [ "simba/libm_force" ]
no_unsound_assume_init = [ ]
macros = [ "nalgebra-macros" ]

# Conversion
convert-mint = [ "mint" ]
convert-glam = [ "glam" ]
convert-glam-unchecked = [ "convert-glam" ] # Enable edgy conversions like Mat4 -> Isometry3
convert-bytemuck = [ "bytemuck" ]
convert-glam013 = [ "glam013" ]
convert-glam014 = [ "glam014" ]
convert-glam015 = [ "glam015" ]

# Serialization
## To use serde in a #[no-std] environment, enable the
Expand All @@ -47,6 +49,8 @@ convert-bytemuck = [ "bytemuck" ]
serde-serialize-no-std = [ "serde", "num-complex/serde" ]
serde-serialize = [ "serde-serialize-no-std", "serde/std" ]
abomonation-serialize = [ "abomonation" ]
rkyv-serialize-no-std = [ "rkyv" ]
rkyv-serialize = [ "rkyv-serialize-no-std", "rkyv/std" ]

# Randomness
## To use rand in a #[no-std] environment, enable the
Expand All @@ -60,39 +64,44 @@ proptest-support = [ "proptest" ]
slow-tests = []

[dependencies]
nalgebra-macros = { version = "0.1", path = "nalgebra-macros", optional = true }
typenum = "1.12"
rand-package = { package = "rand", version = "0.8", optional = true, default-features = false }
num-traits = { version = "0.2", default-features = false }
num-complex = { version = "0.3", default-features = false }
num-rational = { version = "0.3", default-features = false }
approx = { version = "0.4", default-features = false }
simba = { version = "0.4", 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.5", 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 }
serde = { version = "1.0", default-features = false, features = [ "derive" ], optional = true }
abomonation = { version = "0.7", optional = true }
rkyv = { version = "~0.6.4", default-features = false, features = ["const_generics"], optional = true }
mint = { version = "0.5", optional = true }
glam = { version = "0.13", optional = true }
quickcheck = { version = "1", optional = true }
pest = { version = "2", optional = true }
pest_derive = { version = "2", optional = true }
bytemuck = { version = "1.5", optional = true }
matrixcompare-core = { version = "0.1", optional = true }
proptest = { version = "1", optional = true, default-features = false, features = ["std"] }
proptest = { version = "1", optional = true, default-features = false, features = ["std"] }
glam013 = { package = "glam", version = "0.13", optional = true }
glam014 = { package = "glam", version = "0.14", optional = true }
glam015 = { package = "glam", version = "0.15", optional = true }


[dev-dependencies]
serde_json = "1.0"
rand_xorshift = "0.3"
rand_isaac = "0.3"
criterion = "0.2.10"
criterion = { version = "0.3", features = ["html_reports"] }

# For matrix comparison macro
matrixcompare = "0.2.0"
matrixcompare = "0.3.0"
itertools = "0.10"

[workspace]
members = [ "nalgebra-lapack", "nalgebra-glm", "nalgebra-sparse" ]
members = [ "nalgebra-lapack", "nalgebra-glm", "nalgebra-sparse", "nalgebra-macros" ]
resolver = "2"

[[example]]
Expand All @@ -103,10 +112,11 @@ required-features = ["compare"]
name = "nalgebra_bench"
harness = false
path = "benches/lib.rs"
required-features = ["rand"]

[profile.bench]
lto = true

[package.metadata.docs.rs]
# Enable certain features when building docs for docs.rs
features = [ "proptest-support", "compare" ]
features = [ "proptest-support", "compare", "macros" ]
2 changes: 1 addition & 1 deletion benches/core/matrix.rs
Expand Up @@ -188,7 +188,7 @@ fn tr_mul_to(bench: &mut criterion::Criterion) {
let b = DVector::<f64>::new_random(1000);
let mut c = DVector::from_element(1000, 0.0);

bench.bench_function("", move |bh| bh.iter(|| a.tr_mul_to(&b, &mut c)));
bench.bench_function("tr_mul_to", move |bh| bh.iter(|| a.tr_mul_to(&b, &mut c)));
}

fn mat_mul_mat(bench: &mut criterion::Criterion) {
Expand Down
2 changes: 1 addition & 1 deletion benches/lib.rs
@@ -1,4 +1,4 @@
#![feature(test)]
#![feature(bench_black_box)]
#![allow(unused_macros)]

extern crate nalgebra as na;
Expand Down
1 change: 0 additions & 1 deletion benches/linalg/eigen.rs
@@ -1,4 +1,3 @@
use test::Bencher;
use na::{DMatrix, Eigen};

fn eigen_100x100(bh: &mut criterion::Criterion) {
Expand Down
2 changes: 1 addition & 1 deletion examples/cargo/Cargo.toml
Expand Up @@ -4,7 +4,7 @@ version = "0.0.0"
authors = [ "You" ]

[dependencies]
nalgebra = "0.26.0"
nalgebra = "0.27.0"

[[bin]]
name = "example"
Expand Down
8 changes: 4 additions & 4 deletions nalgebra-glm/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "nalgebra-glm"
version = "0.12.0"
version = "0.13.0"
authors = ["sebcrozet <developer@crozet.re>"]

description = "A computer-graphics oriented API for nalgebra, inspired by the C++ GLM library."
Expand All @@ -25,6 +25,6 @@ abomonation-serialize = [ "nalgebra/abomonation-serialize" ]

[dependencies]
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.26", default-features = false }
approx = { version = "0.5", default-features = false }
simba = { version = "0.5", default-features = false }
nalgebra = { path = "..", version = "0.27", default-features = false }
16 changes: 8 additions & 8 deletions nalgebra-lapack/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "nalgebra-lapack"
version = "0.17.0"
version = "0.18.0"
authors = [ "Sébastien Crozet <developer@crozet.re>", "Andrew Straw <strawman@astraw.com>" ]

description = "Matrix decompositions using nalgebra matrices and Lapack bindings."
Expand Down Expand Up @@ -29,18 +29,18 @@ accelerate = ["lapack-src/accelerate"]
intel-mkl = ["lapack-src/intel-mkl"]

[dependencies]
nalgebra = { version = "0.26", path = ".." }
nalgebra = { version = "0.27", path = ".." }
num-traits = "0.2"
num-complex = { version = "0.3", default-features = false }
simba = "0.4"
num-complex = { version = "0.4", default-features = false }
simba = "0.5"
serde = { version = "1.0", features = [ "derive" ], optional = true }
lapack = { version = "0.17", default-features = false }
lapack-src = { version = "0.6", default-features = false }
lapack = { version = "0.19", default-features = false }
lapack-src = { version = "0.8", default-features = false }
# clippy = "*"

[dev-dependencies]
nalgebra = { version = "0.26", features = [ "arbitrary", "rand" ], path = ".." }
nalgebra = { version = "0.27", features = [ "arbitrary", "rand" ], path = ".." }
proptest = { version = "1", default-features = false, features = ["std"] }
quickcheck = "1"
approx = "0.4"
approx = "0.5"
rand = "0.8"
25 changes: 25 additions & 0 deletions nalgebra-macros/Cargo.toml
@@ -0,0 +1,25 @@
[package]
name = "nalgebra-macros"
version = "0.1.0"
authors = [ "Andreas Longva", "Sébastien Crozet <developer@crozet.re>" ]
edition = "2018"
description = "Procedural macros for nalgebra"
documentation = "https://www.nalgebra.org/docs"
homepage = "https://nalgebra.org"
repository = "https://github.com/dimforge/nalgebra"
readme = "../README.md"
categories = [ "science", "mathematics" ]
keywords = [ "linear", "algebra", "matrix", "vector", "math" ]
license = "Apache-2.0"

[lib]
proc-macro = true

[dependencies]
syn = { version="1.0", features = ["full"] }
quote = "1.0"
proc-macro2 = "1.0"

[dev-dependencies]
nalgebra = { version = "0.27.0", path = ".." }
trybuild = "1.0.42"