Commit Graph

1678 Commits

Author SHA1 Message Date
Jenan Wise 7a42513c1a Add empty rustfmt.toml.
Previous commit removed it entirely, but we should have an empty config
file instead to indicate that we use the base config.
2020-06-23 09:49:01 -07:00
Sébastien Crozet b1b18d17ee
Merge pull request #741 from jenanwise/dim-mismatch-verbose-errors
More verbose DMatrix dim asserts where possible.
2020-06-23 01:46:09 -07:00
Jenan Wise eca17586a6 Remove rustfmt.toml.
The CI rustfmt checker uses `stable` rust, not `nightly`, but the
config options in `rustfmt.toml` only work on nightly -- on stable,
there are ignored with warnings. This means that devs running stable
get a lot of warnings and devs running nightly will accidentally format
in a way that the CI checker forbids. (specifically, using
`where_single_line`). E.g.:

```
$ cargo +stable fmt -- --check
Warning: can't set `indent_style = Block`, unstable features are only available in nightly channel.
Warning: can't set `where_single_line = true`, unstable features are only available in nightly channel.
...etc

$ cargo +nightly fmt -- --check
-where
-    N: RealField,
-{
+where N: RealField {
...etc
```

Just removing the toml fixes this problem.
2020-06-22 19:22:33 -07:00
Jenan Wise 85a64fb517 More verbose DMatrix dim asserts where possible.
Previously, most dimension mismatch asserts used raw `assert!` and did
not include the mismatching dimensions in the panic message. When using
dynamic matrices, this led to somewhat-opaque panics such as:

```rust
let m1 = DMatrix::<f32>::zeros(2, 3);
let m2 = DMatrix::<f32>::zeros(5, 10);
m1 + m2 // panic: Matrix addition/subtraction dimensions mismatch.
```

This patch adds dimension information in the panic messages wherever
doing so did not add additional bounds checks, mostly by simply changing
`assert!(a == b, ...)` cases to `assert_eq!`. After:

```rust
// panic: assertion failed: `(left == right)`
//   left: `(2, 3)`,
//  right: `(5, 10)`: Matrix addition/subtraction dimensions mismatch.
```

Note that the `gemv` and `ger` were not updated, as they are called from
within other functions on subset matricies -- e.g., `gemv` is called
from `gemm` which is called from `mul_to` . Including dimension
information in the `gemv` panic messages would be confusing to
`mul` / `mul_to` users, because it would include dimensions of the column
vectors that `gemm` passes to `gemv` rather than of the original `mul`
arguments. A fix would be to add bounds checks to `mul_to`, but that may
have performance and redundancy implications, so is left to another
patch.
2020-06-22 17:18:53 -07:00
sebcrozet 2198b0e6b4 Release v0.21.1 2020-06-07 10:29:10 +02:00
Sébastien Crozet a8f746f911
Merge pull request #736 from rustsim/cholesky_aosoa 2020-06-07 10:02:31 +02:00
sebcrozet 0be9a07f8b Use the #[rustfmt::skip] attribute instead of rustfmt_skip. 2020-06-07 09:30:21 +02:00
sebcrozet 2c2d1e4f07 Run cargo fmt. 2020-06-07 09:07:25 +02:00
Sébastien Crozet 3359e25435 Cholesky: add unchecked construction compatible with AoSoA SIMD. 2020-06-07 09:05:10 +02:00
Sébastien Crozet 423b4b27b0
Merge pull request #585 from fusion-engineering-forks/pr-default 2020-06-07 08:58:47 +02:00
Sébastien Crozet b0ccf13c16
Merge pull request #726 from Hodapp87/typo 2020-04-21 21:12:23 +02:00
Chris Hodapp 7363caba17 Fix doc typo (v is right-singular vectors, not left) 2020-04-21 10:23:00 -04:00
Sébastien Crozet 3e73da38da
Merge pull request #725 from rustsim/fix-no-std 2020-04-21 10:46:04 +02:00
sebcrozet 6dc739b70b Remove unused allocator bound. 2020-04-21 10:37:14 +02:00
sebcrozet f4c0897764 Fix compilation of matrix exponential when targetting no-std. 2020-04-21 10:35:20 +02:00
Sébastien Crozet f30476eb2b
Merge pull request #724 from mxxo/alga-test 2020-04-21 10:03:40 +02:00
Max Orok a50e567fcd Fix alga cfg gate for some quickcheck tests. 2020-04-20 10:06:38 -04:00
Sébastien Crozet 66957980cc
Merge pull request #708 from fredrik-jansson-se/expm
Addition of matrix exponent for static size matrices.
2020-04-12 14:28:46 +02:00
Fredrik Jansson 583a8fb110 Removed unsafe immutable hack 2020-04-12 13:27:11 +02:00
Fredrik Jansson e914afe2af Added support for dynamic matrices 2020-04-12 11:59:06 +02:00
Fredrik Jansson 0a3ee99cdb Changed dimension name R to D
Changed N::from_x to crate::convert
2020-04-12 11:46:00 +02:00
Fredrik Jansson c7d9e415ce Converted tests to use relative_eq 2020-04-07 09:55:58 +02:00
Fredrik Jansson dbbf87a3dd Rebased against dev 2020-04-07 09:44:06 +02:00
Fredrik Jansson 4ec94408b5 Pub use of exp in the linalg module 2020-04-07 09:41:32 +02:00
Fredrik Jansson b3ef66fd14 Fixed bug in onenorm_matrix_power_norm 2020-04-07 09:41:32 +02:00
Fredrik Jansson e156561677 one_norm is not a public function 2020-04-07 09:41:32 +02:00
Fredrik Jansson 2696ffd7a1 Fixed bug by introducing one norm 2020-04-07 09:41:32 +02:00
Fredrik Jansson c0a6df55b1 Addition of matrix exponent for static size matrices. 2020-04-07 09:41:32 +02:00
Fredrik Jansson e6c3b88c3d
Merge pull request #1 from rustsim/dev
Update from main repo
2020-04-07 09:41:12 +02:00
sebcrozet b87920bb8d Release nalgebra v0.21.0 2020-04-05 23:19:10 +02:00
sebcrozet 677f355143 Run rustfmt. 2020-04-05 23:19:10 +02:00
Sébastien Crozet b81aed767f
Merge pull request #713 from rustsim/soa_simd
Switch to Simba and make the base and geometry modules mostly SIMD AoSoA friendly.
2020-04-05 21:16:48 +02:00
sebcrozet 384aee8325 CI: don't run nalgebra-lapack test for now.
This leads to link errors that will need to be investigated later.
2020-04-05 21:00:42 +02:00
sebcrozet 89a6251292 CI: install dependencies for the tests too. 2020-04-05 20:45:19 +02:00
Sébastien Crozet 240aaea626
Merge pull request #711 from cschenio/cschenio/doc
Supplement the document of base/matrix
2020-04-05 20:37:24 +02:00
sebcrozet f782060e99 Fix trailing commas in tests. 2020-04-05 20:36:26 +02:00
sebcrozet ed85d5418a CI: use openblas instead of netlib. 2020-04-05 20:05:53 +02:00
sebcrozet 4233ba1131 CI: add some missing dependencies for lapack 2020-04-05 19:57:31 +02:00
sebcrozet 0c0915d45c CI: install cmake for lapack compilation. 2020-04-05 19:53:25 +02:00
sebcrozet 7bbca5c616 CI: fix feature selection for nalgebra-lapack. 2020-04-05 19:41:58 +02:00
sebcrozet d802b6b5bf CI: add missing component for compiling with Xargo. 2020-04-05 19:00:16 +02:00
sebcrozet eadcb31e78 CI: run the no-std build with the nightly compiler. 2020-04-05 18:56:44 +02:00
sebcrozet 8d41a5c20f CI: fix some syntax errors. 2020-04-05 18:53:50 +02:00
sebcrozet bbb3be512e Run cargo fmt. 2020-04-05 18:49:48 +02:00
sebcrozet bc1b62d06a circleci: run tests too. 2020-04-05 18:48:21 +02:00
sebcrozet 615e092b24 Add circle CI configuration files. 2020-04-05 18:43:45 +02:00
sebcrozet 691f58b622 Fix compilation of tests. 2020-04-05 18:33:03 +02:00
sebcrozet 50ade7e870 Re comment the criterion dependency. 2020-04-05 18:15:36 +02:00
sebcrozet 2c03353b30 Add missing docs. 2020-04-05 18:02:03 +02:00
sebcrozet c5dad7f960 Re-add all the alga trait impls behind a feature. 2020-04-05 17:53:27 +02:00