Sébastien Crozet
5cbbc25bb2
Make vectors indexable the same way as slices.
...
This includes range indexing.
In addition, for unification, the methods `.as_slice` and `.as_mut_slice` of DVec have been renamed
to `.as_ref` and `.as_mut`.
2016-01-10 14:49:37 +01:00
Sébastien Crozet
4098c6c5e5
Make Iso::look_at{_z} static.
...
This did not need to access `self`.
Fix #161 .
2015-11-15 21:56:25 +01:00
Sébastien Crozet
58000e4838
Implement AsRef, AsMut, From for vectors and matrices.
...
This allows pointer conversion between arrays and vectors or matrices.
Those implementations replace the `.as_array()` and `.as_array_mut()` method.
2015-11-15 21:38:28 +01:00
Sébastien Crozet
948341685e
Add implementation of RotationMatrix
for UnitQuat
.
2015-11-15 21:38:23 +01:00
Daniel D
179a6560ce
Fix eigenvalue calculation for diagonal matrices
2015-11-14 15:40:35 +01:00
Sébastien Crozet
37f1a1d26c
Style fixes.
2015-10-13 22:53:19 +02:00
Daniel
c4753aaf65
Implemented QR algorithm with initial transformation to Hessenberg form and Wilkinson shift for symmetric matrices
2015-09-22 15:17:03 +02:00
Jeroen Bollen
72ce1881ce
Fixed issue #154 https://github.com/sebcrozet/nalgebra/issues/154
2015-09-15 19:47:27 +02:00
Sébastien Crozet
0bcbd4df4b
Removed unused import.
2015-09-13 23:53:28 +02:00
Antsiscool
f9d79fcf5a
Removed Display trait from Debug method for DMat.
...
DMat was unable to show using debug if the object stored in it did not implement Display.
2015-09-10 14:34:41 +10:00
Anders Kalør
043d7ab108
Fix wrong allocated vector length in RowSlice
...
The length of the returned DVec should correspond to the
the number of elements in the slice and not the number of rows in the
matrix.
2015-08-27 16:55:20 +02:00
Sébastien Crozet
0a8920f11c
Merge pull request #150 from sebcrozet/rustup
...
Fix warnings generated by the last rust-nightly.
2015-08-20 21:46:46 +02:00
Sébastien Crozet
ca3c4e73c5
Fix warnings generated by the last rust-nightly.
2015-08-20 21:41:40 +02:00
Tim Kuehn
e2c21c4ae2
Fix transpose_mut for square matrices.
...
And add a test for it.
2015-08-12 16:52:55 -07:00
Sébastien Crozet
2091cd8da6
Minor codding style fixes.
2015-08-09 14:39:45 +02:00
Daniel
89bbe0f4b4
Removed unused code
2015-08-08 17:52:16 +02:00
Daniel
dc571838bb
Added check for symmetricity of input matrix
2015-08-07 15:03:38 +02:00
Daniel
b197959e2b
Implemented Cholesky decomposition with tests
2015-08-07 14:44:25 +02:00
Arttu Ylä-Outinen
75208896a3
Fix multiplication of non-square DMats.
...
Matrices were in wrong order.
2015-07-12 10:25:43 +03:00
Sébastien Crozet
c13b0388ef
Remove implementations of Rotation
, Translation
and Transformation
for the Identity
type.
...
Because most of their methods did not make sence for the (constant) identity matrix, they were set
to `panic!` at runtime whenever the user tried to use them. Instead, it is much safer to completely
forbid their use by removing the related trait implementation.
See sebcrozet/ncollide#87 .
2015-07-07 22:40:14 +02:00
mitchmindtree
2efb30876e
Added missing ops implementations for DMat
2015-06-21 01:08:23 +10:00
mitchmindtree
51381ff84d
Allow for non-consuming std operations on DMat. Added DMat multiplication test.
2015-06-21 00:20:39 +10:00
Sébastien Crozet
44df67bde2
Fix the README examples.
2015-06-06 14:28:34 +02:00
Sébastien Crozet
410c3c9566
Add pointwise addition and subtraction for DMat
.
...
Fix #132 .
2015-06-06 12:59:47 +02:00
Sébastien Crozet
ea86890647
Add the RotationTo
trait to compute the delta rotation between two elements.
...
Use `::angle_between` or `.angle_to` to compute the rotation angle between two vectors/rotation
matrices/unit quaternions.
Use `::rotation_between` or `.rotation_to` to compute the rotation matrix/unit quaternion to
transform a vector/rotation matrix/uniq quaternion to another.
Fix #130 .
2015-06-01 22:39:27 +02:00
Sébastien Crozet
ca87f9eb95
Rollup of minor beaking changes.
...
Use associated types for the `Outer` trait.
Add a `Repeat` trait for constructing a multidimensional value by repeating an element.
Split the `Diag` trait into `Diag` and `DiagMut`.
Implement `RustEncodable` for `Identity`.
2015-05-25 14:47:14 +02:00
Tinco Andringa
b26a994659
This reference should not be mut
2015-05-09 16:23:53 +02:00
Sébastien Crozet
5f7b480827
Merge pull request #125 from tinco/add_neg_to_base_float
...
Add neg trait to BaseFloat
2015-05-08 23:55:00 +02:00
Tinco Andringa
83917cb4a4
Qualify the output of FloatVec Neg
2015-05-08 21:44:03 +02:00
Tinco Andringa
f0ce528903
Add neg trait to BaseFloat
2015-05-08 21:03:13 +02:00
Eduard Bopp
730dc40b01
Remove operator hacks
...
The LMul, RMul and Scalar* traits were only necessary due to language
limitations regarding trait bounds that are now gone. The Mat trait is now
expressed in terms of regular operator traits.
However, due to the removal of these traits this constitutes a breaking change.
2015-05-06 13:23:14 +02:00
arturo castro
24fa9c7826
fixes for latest rust
2015-04-23 20:26:16 +02:00
Sébastien Crozet
36223991c1
Remove all deprecated functions/traits.
2015-04-18 14:58:38 +02:00
Sébastien Crozet
313ca1b8ae
Use the Zero
and One
traits from the num
crate.
...
Remove our own definitions of those traits.
Also fixes test-related attributes to make them compile again.
2015-04-18 14:38:34 +02:00
Eduard Bopp
e453bfed47
Use Float trait from num crate
2015-04-04 17:53:25 +02:00
Eduard Bopp
9d428be8b4
Rename frac_2_sqrtpi -> frac_2_sqrt_pi
2015-04-04 17:05:30 +02:00
Anders Kaseorg
e3962e8775
FRAC_2_SQRTPI was renamed to FRAC_2_SQRT_PI
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-04-04 16:58:11 +02:00
Eduard Bopp
49abb42980
Merge pull request #114 from andersk/neg
...
Remove Neg from BaseNum
2015-04-04 16:44:29 +02:00
Anders Kaseorg
d47cdb5594
Remove Neg from BaseNum
...
As per https://github.com/rust-lang/rust/pull/23945 , Neg is no longer
implemented for unsigned types.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-04-03 18:59:18 -04:00
Anders Kaseorg
005aebc498
Remove #![feature(core)]
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-04-02 04:53:55 -04:00
Anders Kaseorg
165e095a57
Remove use of num::cast
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-04-02 04:53:55 -04:00
Anders Kaseorg
c1cbf7465d
Remove use of PI_2
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-04-02 04:10:36 -04:00
Anders Kaseorg
1cb3314064
Add type annotation required by rustc 2015-03-31
...
Resolves this error, which is fallout from
https://github.com/rust-lang/rust/pull/23673 :
src/structs/dmat.rs:501:43: 501:74 error: type annotations required: cannot resolve `<f64 as core::ops::Div<_>>::Output == f64` [E0284]
src/structs/dmat.rs:501 let normalizer: N = Cast::from(1.0f64 / Cast::from(self.nrows));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-03-31 17:49:09 -04:00
Eduard Bopp
ef4a52d53b
Remove unused feature unboxed_closures
2015-03-29 13:45:33 +02:00
Eduard Bopp
de2351a441
Only use test feature in test configuration
2015-03-29 13:45:33 +02:00
Eduard Bopp
70b4def5cc
Stop using unstable std_misc feature
...
It was only used for `Float::{max_value, min_value}` in non-necessary places,
so for now this helps stabilization for Rust 1.0.
2015-03-29 13:45:33 +02:00
Eduard Bopp
df93ed2d1c
Replace quoted crate declarations
2015-03-29 13:00:09 +02:00
Eduard Bopp
ec5ece46ca
Use slicing syntax instead of deprecated methods
2015-03-29 12:57:16 +02:00
Sébastien Crozet
0988b837dc
Update to the last rust-nighly.
...
Version of rustc: rustc 1.0.0-nightly (123a754cb 2015-03-24).
2015-03-25 22:39:06 +01:00
Pierre Krieger
7c415692c3
Update for rustc
2015-03-23 14:38:48 +01:00