DMat: implement `from_row_iter` and `from_col_iter`.
Those create a DMat by moving its argument into an interator and collecting it.
Fix #167.
Implement dynamic matrix with a maximum size.
Those are named DMat1 to DMat6 and have the same relation with DMat as DVec1 to DVec6 are related
to DVec.
As a side effect, the method `to_vec` of DMat was renamed `into_vec` to be more in line with the std lib.
Addresses the second point of #100.
Implement `Row` and `Col` for `DMat`.
Fix #153.
Implement `Mean` for `DVec`, `DVecN`, `VecN` and `MatN`.
Fix #166.
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`.
Merge pull request #165 from sebcrozet/misc
Fix #161 and addresses #160.
Release v0.4.0
Make Iso::look_at{_z} static.
This did not need to access `self`.
Fix #161.
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.
Add implementation of `RotationMatrix` for `UnitQuat`.
Release v0.3.2.
Merge pull request #164 from dshizzle/master
Fix QR algorithm for diagonal matrices
Fix eigenvalue calculation for diagonal matrices
Release v0.3.1.
Style fixes.
Merge pull request #156 from dshizzle/master
Improved QR algorithm convergence
Implemented QR algorithm with initial transformation to Hessenberg form and Wilkinson shift for symmetric matrices
Release 0.3.0.
This includes breaking changes for the Rot3::look_at{_z} method.
Merge pull request #155 from Binero/master
Fixed issue #154 https://github.com/sebcrozet/nalgebra/issues/154
Fixed issue #154 https://github.com/sebcrozet/nalgebra/issues/154
Removed unused import.
Release version 0.2.23.
Merge pull request #152 from Antsiscool/master
Removed Display trait requirement from Debug method for DMat.
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.
Release v0.2.22.
Merge pull request #151 from AndersKaloer/row_slice-fix
Fix wrong allocated vector length in RowSlice for DMat
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.
Add RowSlice and ColSlice test cases for DMat
Merge pull request #150 from sebcrozet/rustup
Fix warnings generated by the last rust-nightly.
Fix warnings generated by the last rust-nightly.
Merge pull request #149 from tikue/master
Fix transpose_mut for square matrices.
Fix transpose_mut for square matrices.
And add a test for it.
Release v0.2.21.
Minor codding style fixes.
Merge pull request #147 from dshizzle/master
Implemented Cholesky decomposition
Removed unused code
Made tests more readable - missed a function
Made tests more readable
Added check for symmetricity of input matrix
Implemented Cholesky decomposition with tests
Merge pull request #144 from sebcrozet/travis_badge
Add Travis badge to the README.
Add Travis badge to the README.
Fix #140.
Release v0.2.20.
Merge pull request #143 from aryla/master
Fix multiplication of rectangular DMats.
Fix multiplication of non-square DMats.
Matrices were in wrong order.
Add a test for multiplication of non-square DMats.
Demonstrates a bug in Mul implementation.
Merge pull request #141 from sebcrozet/no_identity_fail
Remove implementations of `Rotation`, `Translation` and `Transformation` for the `Identity` type.
Release v0.2.19.
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.
Release v0.2.18.
Merge pull request #139 from mitchmindtree/master
Allow for non-consuming std operations on DMat. Added DMat multiplication test.
Added missing ops implementations for DMat
Allow for non-consuming std operations on DMat. Added DMat multiplication test.
Merge pull request #138 from sebcrozet/fix_travis
Don't run benchmarks on travis.
Don't run benchmarks on travis.
Benchmarks require `#[feature(test)]` which is not supported by the stable branch.
Fix the README examples.
Release v0.2.17.
Merge pull request #133 from sebcrozet/dmat_add_sub
Add pointwise addition and subtraction for `DMat`.
Add pointwise addition and subtraction for `DMat`.
Fix #132.
Release v0.2.16.
Merge pull request #131 from sebcrozet/rotation_to
Add the `RotationTo` trait to compute the delta rotation between two elements.
Add tests for `::angle_between` and `::rotation_between`.
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.
Merge pull request #129 from sebcrozet/ncollide_fixes
Minor breaking changes needed by `ncollide`.
Release 0.2.15
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`.
Releave v0.2.14
Merge pull request #127 from tinco/index_transmute_bug
This reference should not be mut
This reference should not be mut
Release v0.2.13
Merge pull request #125 from tinco/add_neg_to_base_float
Add neg trait to BaseFloat
Merge pull request #124 from aepsil0n/remove-ops-hacks
Remove operator hacks
Qualify the output of FloatVec Neg
Add neg trait to BaseFloat
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.
Release v0.2.12
Merge pull request #122 from arturoc/master
fixes for latest rust
fixes for latest rust
Release v0.2.11
Merge pull request #121 from sebcrozet/remove_deprecated
Remove all deprecated functions/traits.
Merge pull request #120 from sebcrozet/num_zero_one
Use the `Zero` and `One` traits from the `num` crate.
Remove all deprecated functions/traits.
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.
Merge pull request #117 from aepsil0n/num-float
Use Float trait from num crate.
Use Float trait from num crate
Release version 0.2.10
Merge pull request #116 from aepsil0n/frac2pi
frac_2_sqrt_pi renaming
Rename frac_2_sqrtpi -> frac_2_sqrt_pi
FRAC_2_SQRTPI was renamed to FRAC_2_SQRT_PI
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Merge pull request #114 from andersk/neg
Remove Neg from BaseNum
Merge pull request #112 from andersk/excise-core
Remove #![feature(core)]
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>
Remove #![feature(core)]
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Remove use of num::cast
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Remove use of PI_2
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Merge pull request #110 from andersk/annotation
Add type annotation required by rustc 2015-03-31
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>
Bump the version number.
Merge pull request #109 from aepsil0n/stabilization
Partial stabilization to Rust 1.0
Remove unused feature unboxed_closures
Only use test feature in test configuration
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.
Merge pull request #107 from aepsil0n/fix-benchmarks
Fix benchmarks
Fix benchmarks
The extern crate declarations had to be adjusted.
Merge pull request #106 from aepsil0n/fix-nightly
Update to latest nightly
Replace quoted crate declarations
Use slicing syntax instead of deprecated methods
Depend on `rand = "*"` instead of a specific version.
Merge pull request #104 from aepsil0n/fix-benchmark
Make the benchmarks compile again
Make the benchmarks compile again
Merge pull request #103 from tomaka/patch-1
Update to rand 0.3
Update to rand 0.3
Update to the last rust-nighly.
Version of rustc: rustc 1.0.0-nightly (123a754cb 2015-03-24).
Merge pull request #102 from tomaka/rustup
Update for rustc
Bump version
Update for rustc
Release version 0.2.5
Merge pull request #99 from jpernst/ffi
Add [repr(C)] to structs likely to be used in FFI
Merge pull request #98 from jpernst/nightly
Nightly fixes
Add #[repr(C)] to structs likely to be used in ffi
Fix deprecated closure syntax
Fix deprecated suffixes in tests
Fix macros for nightly
Release version 0.2.4
Merge pull request #96 from aepsil0n/warnings
Fix a number of warnings
Fix a number of warnings
Mostly related to the `us` → `usize` suffix renaming. It turns out that none of
the suffixes are required any more, as the type inference appears to have
improved in that regard. There were also parantheses around range terms that
are not required any more.
Finally the `[]` syntax has been deprecated and thereby removed.
Merge pull request #95 from bfops/master
FromIterator changes and phantom type annotations.
FromIterator changes and phantom type annotations.
Bump to version 0.2.3
Merge pull request #94 from aepsil0n/fix-nightly
Adapt to upstream changes
Fix benchmarks
Fix bug in UnitQuat construction from Quat
Fix dependency in arbitrary tests
Fix iterator mutability
For loops now consume iterators.
Migrate random generation to use crates.io rand
The standard library random generation facilities have been deprecated in
favour of a new crate on crates.io.
Avoid superfluous plugin usage in test
Merge pull request #90 from retep998/update-rust
Update rust
Update rust
Signed-off-by: Peter Atashian <retep998@gmail.com>
Merge pull request #87 from aepsil0n/workaround-ice
Workaround internal compiler error.
Merge pull request #86 from aepsil0n/rename-mut-copy-methods
Rename similar in-place and copy methods.
Workaround internal compiler error
The associated type bound here was not parsed correctly. This is likely due to
the ICE described in rust-lang/rust#20413.
Rename similar in-place and copy methods
Fixes #52.
This renames pairs of methods like `normalize_cpy`, `normalize` to `normalize`
and `normalize_mut`. Note that the previous in-place operations had the same
name that now belongs to the copy operations. Therefore this is a breaking
change.
On a similar note, the `Quat::conjugate` method was also renamed to
`conjugate_mut` and a new copying method has taken its place. This appears to
be a similar issue (apart from the lack of the copy operation) and thus was
dealt with here, too.
Silence warnings and replace `Show` by `Debug`.
Merge pull request #83 from aepsil0n/asserteq-refs
Implement AssertEq for reference types
Bump the version number.
Implement AssertEq for reference types
Just as the standard library's PartialEq is implemented for reference types,
the ApproxEq trait should be implemented on them as well. This is mostly an
ergonomic improvement for certain testing situations, where a method yields a
reference. For non-copy types it allows using the assert_approx_… macros, which
would otherwise not be possible.
Merge pull request #80 from zsiciarz/master
Update to latest rustc
Fix type errors in tests
Fix Debug implementation for DMat.
Update to the last rust-nightly.
Version of rustc: 1.0.0-nightly (4874ca36f 2015-01-23 00:18:57 +0000).
Bump the version number.
Coding style fixes.
Merge pull request #77 from arturoc/fix-basenum
impl BaseNum for integers.
impl BaseNum for integers
Merge pull request #75 from blevin/master
fix warning from unneeded old_orphan_check
fix warning from unneeded old_orphan_check
Merge pull request #74 from aepsil0n/arbitrary
Implement Arbitrary for (almost) all types.
Continuos integration of extra feature
There is a manual script for Travis CI now.
Implement Arbitrary for (almost) all types
Rot4 and Iso4 had to be left out, since Rot4 apparently lacks a working
constructor.
Thereby (almost) all types in nalgebra can now be used for quickcheck-style
testing.
"arbitrary" is now a conditionally compiled feature that contains these impls
adding a dependency on quickcheck.
Merge pull request #73 from sebcrozet/rustup_warn
Rustup warn
Fix automatic text replacement on comments.
Fix tests and benches.
Allow unstable items.
Some of them don't have any stable equivalent yet.
Use slice and range syntax when possible.
Fix warnings related to the POrd implementation.
Replace int, and uint, by isize and usize.
Remove tabs.
Merge pull request #72 from arturoc/fix-alpha
fixes compiling on alpha 1.0
fixes compiling on alpha 1.0
Merge pull request #70 from bfops/fnmut
Change Fn to FnMut
Merge pull request #69 from bfops/master
rustup
Change Fn to FnMut
rustup
Merge pull request #68 from bfops/master
Remove obsolete closure syntax
Remove obsolete closure syntax
Merge pull request #67 from tomaka/update-rustc
Update for Rustc
Update for Rustc
Fix an unconstrained type in `na::shape`.
Merge pull request #66 from sebcrozet/rustup
Update to the last rust-nightly.
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (c6c786671 2015-01-04 00:50:59 +0000).
Merge pull request #61 from mikedilger/ulps
ApproxEq trait enhanced with ULPs method of specifying closeness:
Remove glob imports.
Merge pull request #64 from Connorcpu/master
Updated to latest rust master
Updated to latest rust master
Merge pull request #63 from aepsil0n/rust-nightly
Update to latest Rust
Update to latest Rust
The version is rustc 0.13.0-dev (cd614164e 2015-01-02 02:31:12 +0000).
The fixed array syntax was changed from [x, ..3] to [x; 3].
Merge pull request #62 from bfops/master
Update for last rustc of 2014!
Update for last rustc of 2014!
tests for ApproxEq ULPs
fix macro
ApproxEq trait enhanced with ULPs method of specifying closeness:
approx_eq_ulps() allows specification of epsilon as an integer number
of Units in the Last Place (ULPs) difference between the two floating
point values
default approx_ulps() is set to 8.
approx_eq() function continues to use epsilon method, although I
recommend further commits and a migration towards the ULPs method.
Fix benches.
Merge pull request #59 from bfops/master
Fix Encodable/Decodable deprecation warnings
Fix Encodable/Decodable deprecation warnings
Merge pull request #57 from tomaka/master
Update for rustc
Fix Neg trait taking self instead of &self
Rename std::slice::Items -> std::slice::Iter
Merge pull request #56 from aepsil0n/macro_item_semicolons
Add trailing ';' to all item macros
Add trailing ';' to all item macros
This is a fix for the latest nightly, see
https://github.com/rust-lang/rust/pull/19984.
Merge pull request #55 from sebcrozet/rustup
Update to the last rust-nightly.
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (42deaa5e4 2014-12-16 17:51:23 +0000).
Fix #54.
Merge pull request #53 from aepsil0n/update_nightlies
Update to latest Rust
Derive Copy wherever sensible
Copy is now opt-in, see [1]. To keep the current library functionality it is
derived for all sensibly copyable types.
[1]: https://github.com/rust-lang/rust/commit/096a28607fb80c91e6e2ca64d9ef44c4e550e96c
Update to latest Rust
Merge pull request #51 from aepsil0n/oop_style_traits
Use object-oriented style for trait methods
Use object-oriented style for trait methods
Wherever sensible the geometric traits now take `&self` arguments, so that
implementations can be invoked as instance methods instead of static methods.
This makes some idioms easier to express and generally allows for greater
flexibility as the restructured methods can still be invoked like static
methods.
Fixes #39.
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (fac5a0767 2014-11-26 22:37:06 +0000).
Do not mantion the double-dispatch on the doc.
Merge pull request #49 from sebcrozet/multidispatch
Replace the double dispatch trick by multidispatch!
Replace the double dispatch trick by multidispatch!
Fix #38.
Add float constants to `BaseFloat`.
Fix #42.
Make `from_array`-like methods static.
Fix #45.
Merge pull request #43 from aepsil0n/assert_approx_eq_macros
Implement assertion macros for ApproxEq
Implement assertion macros for ApproxEq
These macros yield readable error messages as test assertions for ApproxEq
types. They can be invoked as:
assert_approx_eq!(a, b);
assert_approx_eq_eps!(a, b, eps);
Fixes #40.
Add metadatas for crates.io
cc #37.
Merge pull request #35 from aepsil0n/to_homogeneous_self
Have ToHomogeneous use &self in method signature
Have ToHomogeneous use &self in method signature
I find makes the syntax a bit lighter.
Merge pull request #34 from aepsil0n/translate_doc
Fix erroneous Translate documentation
Fix erroneous Translate documentation
Looks like it's been copied & pasted without adapting.
Add conversion from/to arrays for matrices and vectors.
Use `.as_array()`, `.as_array_mut()`, `.from_array_ref()`, `.from_array_mut()`.
Fix #33.
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (e09d98603 2014-11-18 23:51:43 +0000).
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (336349c93 2014-11-17 20:37:19 +0000).
Use our own traits instead of the deprecated ones.
We might switch to bjz/num-rs eventually (#32), but in the mean time we just re-declare the
deprecrated traits in nalgebra.
Quick update to the last rust-nightly.
This is just a quick-fix so that nalgebra compiles.
This does not fix the deprecation warnings!
Version of rustc: 0.13.0-nightly (d91a015ab 2014-11-14 23:37:27 +0000).
Fix warnings.
Add more benchmarks.
Overload `DVec * DVec -> DVec` and `DVec / Dvec -> DVec`.
Fix #31.
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (63c4f22f2 2014-11-05 22:31:44 +0000).
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (3327ecca4 2014-11-01 22:41:48 +0000).
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (221fc1e3c 2014-10-31 02:27:15 +0000).
Do not automatically impl Scalar{Mul,Div,Add,Sub}.
This makes them implementable without using the double dispatch trick.
Always use `Cast<f64>` instead of `Cast<f32>`.
Basis: add a method to compute the i-th element of the canonical basis.
Move the `eigen_qr` function behind the `EigenQR` trait.
This simplifies generic programming.
Add a `SquareMat` trait for square matrices.
Rename: Any{Vec,Pnt} to Num{Vec,Pnt} + do not impl them automatically.
Instead, implement them manually. This clarifies error messages for the users.
Coding style fix.
Move the `.shape()` method to its own trait: `Shape`.
Make FloatPnt and FloatVec derive from `Index`.
The point it that `Index` provides the i-th element decomposed into the trivial basis of their
associated vector spaces.
Matrix Index/IndexMut implementation: return an element instead of a column.
There is no reason why indexing would prefer returning a column instead of a line. Instead, we
return an element, and let the user use the `Col` and `Row` traits istead.
Remove the {Any,Float}{Pnt,Vec}Ext traits.
They are meaningless and too hard to implement in an ad-hoc way to be really useful.
Rename: PartialOrd -> POrd, PartialOrdering -> POrdering.
This avoids name clashes with the standard library.
Make `AnyVec` inherit from `Basis`.
Every vector must have a basis.
Rename: VecExt -> AnyVecExt, PntExt -> AnyPntExt.
Merge pull request #29 from steveklabnik/master
fail -> panic
fail -> panic
Merge pull request #28 from globin/master
Upgrade to newer rust.
upgrade to newer rust
Deprecate `to_pnt`, `as_pnt` and `VecAsPnt`.
Those are meaningless. Use `na::orig() + the_vector` instead.
Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (222ae8b9b 2014-10-18 00:47:22 +0000).
Add quaternions to the feature list.
Add quaternions.
Fix #24.
Fix typos.
Add 3D orthogonal and perspective projection structures.
Fix #26.
Some documentation fixes.
Fix #25.
Add a `Axpy` that implements y <- y + ax.
This is very useful for accumulations to compute, e.g. centers.
Do not implement `Transform<Vec*> for Vec*`.
This is error prone as this is a no-op for vectors and a translation for points.
Remove the `Iso * Vec` overload and the ability to Transform a Vector with an Iso.
This is too error prone as the user has to remember if he is using a vector or a point.
Istead, to transform a vector with an Isometry, use the internal rotation matrix of the isometry:
`iso.rotation * vector` instead of `iso * vector`.
The `Rotation` trait can also be used.
Add a function `nalgebra::center(a, b)` that computes the center of two points.
Delete the deprecated `na::` module.
Documentation fixes.
Fix the implementation of `ToHomogeneous` for `Iso*`.
Add `to_pnt` and `to_vec` methods.
Add points.
This adds the Pnt{1,2,3,4,5,6} structures.
This adds the traits:
− AnyPnt
− FloatPnt
− PntExt
− FloatPntExt
− Orig (to return the zero point)
− PntAsVec
− VecAsPnt
This adds operator overloading:
− Pnt + Vec
− Pnt - Vec
− Pnt * Scalar
− Pnt / Scalar
− Pnt + Scalar
− Pnt - Scalar
− Iso * Pnt
− Rot * Pnt
− Pnt * Iso
− Pnt * Rot
This changes some behavior:
− Iso multiplication with a Vec does not translate the vector any more.
− ToHomogeneous adds a 0.0 at the end of a Vec and a 1.0 at the end of a Pnt.
− FromHomogeneous performs w-normalization on a Pnt, but not on a Vec.
− The Translate<Vec> trait is never implemented (i-e. a Vec is not to be translated).
cc #25
Deprecate `na::`, move all reexport to the root crate.
This also moves the tests and benches to cargo-complient folders.
Fix #21.
Update to the last rust.
Version of rustc: rustc 0.12.0-nightly (d64b4103d 2014-09-26 21:47:47 +0000).
Fix the matrix inversion test.
This prevent the test from failing when the matrix is non-inversible.
Fix the implementation of `Row` for fixed-size matrices.
Matrices are column-major.
Merge pull request #20 from bjz/warnings
Fix warnings
Merge pull request #19 from bjz/index-operators
Implement index operators
Fix warnings
Implement index operators
Closes #18
Merge pull request #17 from bfops/master
update for rustc 21d1f4d7c
update for rustc 21d1f4d7c
Update to the last rust-nightly.
Version of rustc: 0.12.0-pre-nightly (2e92c67dc 2014-08-28 23:56:20 +0000).
Update .travis.yml.
Fix .travis.yml to use rustup.
Update to the last rust-nightly.
Version of rustc: 0.12.0-pre-nightly (01ec6fab2 2014-08-18 00:46:10 +0000).
Remove the shifting from the qr algorithm.
Do not compute the matrix inverse if the determinant is near-zero.
Add `na::eigen_qr` that performs an eigendecomposition using the qr algorithm.
Add a `Diag` to build, get and set a matrix diagonal.
Add the types: DVec1, .., DVec6.
They are stack-allocated, dynamically sized vectors with a maximum size.
This is useful for slicing small matrices, without allocation.
Add a `Det` trait to compute the determinant + implement it for `Mat{1,2,3}`.
Add a `clean` rule to the makefile.
Avoid modulo on `DMat::from_fn`.
Merge pull request #16 from nathanic/master
Fix coordinate calculation in DMat::from_fn().
Fix coordinate calculation in DMat::from_fn().
The builder function `f` was receiving incorrect coordinates, often
involving a uint underflow.
Added a test case to verify the new behavior.
Remove `crate_type` from Cargo.toml.
Update the compilation section of the README.
Cleanup the Makefile + update travis.yml.
Make cargo build a rlib too.
Add a `ScalarMul` and a `ScalarDiv` trait.
Those might be useful to overcome rust limitations wrt operator overloading.
Fix travis.yml.
Update to the last rust-nightly.
Version of rustc: 0.11.0-nightly (5ad7286dc37839b7234ff51aab172e48935869d8 2014-07-12 00:31:46 +0000)
Update to the last rust-nightly.
Version of rustc: 0.11.0-nightly (459f155f81291c46633e86a480628b50304ffb1c 2014-07-04 23:46:44 +0000).
Add Cargo.toml.
Update some links to point on `nalgebra.org`.
Update to the last rust-nightly.
Version of rustc: 0.11.0-pre-nightly (e55f64f 2014-06-09 01:11:58 -0700).
Merge pull request #15 from garrison/patch-1
Update README.md: extern mod -> extern crate.
Update README.md: extern mod -> extern crate
Update to the last rust-nightly.
Version of rustc: 0.11.0-pre-nightly (918dbfe 2014-06-02 20:51:30 -0700).
Update to the last rust-nightly.
Version of rustc: 0.11.0-pre-nightly (faa7ba7 2014-05-31 01:06:40 -0700).
Main changes:
* `cmp::Ord` -> `cmp::PartialOrd`
* `cmp::Eq` -> `cmp::PartialEq`
Note that `na::PartialOrd` is not the same as `cmp::PartialOrd`
(which lacks a lot of partial ordering operators).
Merge pull request #14 from Shr1k3/master
Fixed issue #13
Fixed issue #13
Rename matrix-scalar and vector-scalar operator-overloading-related traits to avoid name clashes.
Compile with nightlies
Merge pull request #9 from vbarrielle/genericQR
Generic QR factorization
update to the latest rust: FloatMath for math functions (sin/exp/...)
Also removed a bunch of duplicate trait usages
QR decomposition mentionned in README
update to latest rust
Merge remote-tracking branch 'origin/master' into genericQR
new_identity and housholder matrix available under na::
fix typo
Merge pull request #8 from alexanderchr/master
std::cast::transmute -> std::mem::transmute
QR factorization for fixed size matrices.
The ColSlice implementation for fixed size matrices returns a DVec,
while this is probably not optimal performance-wise, the dynamic nature
of the result makes this necessary. Using a data type presenting the
ImmutableVector trait would solve this, but it looks like a non-trivial
change.
std::cast::transmute -> std::mem::transmute
generic implementation of QR decomposition
But static matrices can't use it yet, they need to implement the
Row/Col slicing traits.
more generic QR: generalize the impl of the Indexable trait
This allows the implementation of householder reflection without relying
on knowledge of DVec. This required a new member in the Indexable trait:
the shape() function, which returns the maximum index available.
Merge pull request #6 from vbarrielle/master
Implementation of QR factorizarion
fixing style issues
Fix travis.yml.
See http://bettong.net/2014/05/09/how-to-test-rust-on-travis-ci/
Moving row/col slicing traits to a better place
QR decomposition depends less on DMat internals
implemented QR factorization
this is a first sketch, the algorithm is not yet initialized and relies
on knowledge of DMat internals. A next step would be to implement this
algorithm in a more generic manner.
Give access to the traits required for generalized operator overloading.
Those are `Vec3MulRhs`-like traits that allow the simulation of haskellish fundeps to allow multiple
overloads of builtin operators (* / + -).
They are all on the `na::overload` module.
Update to the last Rust.
Version of rustc: 0.11-pre (eea4909 2014-04-24 23:41:15 -0700)
Vector do not implement `Rand` anymore.
Avoid name conflicts with the standard lib.
The `Vec` trait is renamed `AnyVec`.
The `Less`, `Greater`, `Equal` variants are renamed `PartialLess`, `PartialGreater`,
`PartialEqual`.
Those new names are not very good, so they might change in the future.
Make Iso* fields public again.
Update to the last Rust.
Version of rustc: 0.10-pre (b8ef9fd 2014-03-31 15:51:33 -0700)
struct fields are now public by default.
Automatically derive `TotalEq` whenever `Eq` is derived.
Update to the last Rust.
Version of rustc: rustc 0.10-pre (b8601a3 2014-03-28 06:26:47 -0700)
Remove every `use std::vec::Vec`.
It is part of the Rust prelude now.
Update to the last Rust.
Version of rustc: 0.10-pre (7b957a8 2014-03-21 08:21:51 -0700)
Use Vec instead of ~[].
Version of rustc: 0.10-pre (fc7a112 2014-03-14 23:11:31 -0700)
Merge pull request #5 from cacteye/patch-1
Update to latest rust.
Change std::rand to rand in lower_triangular.rs
Update to latest Rust.
Version of rustc: rustc 0.10-pre (4d64441 2014-03-12 15:07:06 -0700)
Update to latest rust.
`std::rand` was moved to it's own crate.
Version of rustc: rustc 0.10-pre (4d64441 2014-03-12 15:07:06 -0700)
Remove the DeepClone derivings.
Version of rustc: 0.10-pre (e959c87 2014-03-08 22:41:45 -0800)
Update to the last Rust.
Version of rustc: 0.10-pre (4243cad 2014-02-24 22:17:02 -0800)
Update to the last rust.
Version of rustc: 0.10-pre (a5342d5 2014-02-23 22:06:50 -0800)
Add deriving `Hash` and `Show`.
Update to the last Rust.
Version of rustc: 0.10-pre (698042d 2014-02-21 21:26:49 -0800)
Add free functions for partial ordering comparison operators.
Add more comparison default methods to the `PartialOrd` trait.
This allows for some optimization.
Update to the last Rust.
Version of rustc: 0.10-pre (b0ce960 2014-02-17 22:16:51 -0800)
This replaces uses of the `Orderable` trait by a `PartialOrd` trait: the `min` and `max` methods
are replaced by `inf` and `sup` methods.
Vectors do not implement the `Ord` trait any more.
Fix #4
Merge pull request #3 from aepsil0n/fix/swap
Fix call to swap function due to upstream changes.
Fix call to swap function due to upstream changes
Rust moved this function from std::util (which has been dissolved now) to std::mem.
Update to the last Rust.
Version of rustc: 0.10-pre (9a672f9 2014-02-05 18:31:36 -0800)
Activate the unused_results lint.
Update to the last Rust.
Version of rustc: 0.10-pre (e3b1f3c 2014-01-29 23:46:26 -0800)
Remove useless parenthesis.
Fix the doc root url.
Modify `.travis.yml` to generate the documentation.
Update to the last Rust.
Version of rustc: 0.10-pre (d4640f9 2014-01-20 11:41:29 -0800)
This also removes the `PVec` type due to lack of use-case.
Fix the documentation for `na::inv_translate`.
Make `make test` test the documentation examples too.
Doc: fix some typos.
Add the `html_doc_url` attribute.
Update to the last Rust
Version of rustc: 0.10-pre (1da2962 2014-01-17 23:41:45 -0800)
Iterators were renamed.
Update to the last Rust.
The `Bounded` trait is no longer on the Rust prelude.
Revert "Update to the last Rust."
This reverts commit c1b91eefbb87437491de221af40245c3a4a855ff.
As a matter of fact, Bounded has not been deleted.
However it is no longer automatically exported by the stdlib.
Update to the last Rust.
The `Bounded` trait does not exist any more.
Fix the example on the README.
Fix the link to the online documentation.
Make the `struct` and `traits` modules private.
Now that the documentation of public export of private modules is inlined on the exporter's
documentation, there is non need to export anything but the `na` module.
Inline the default implementation of approx_eq
Add the ApproxEq trait.
It is no longer part of std::num
Add a `perspective3d` free function on the na:: module.
Update to the last Rust.
Update to the last Rust: pkgid -> crate_id
Merge pull request #2 from jhasse/patch-vec
Use new std::vec functions
Use new std::vec functions
Fix pkgid.
Update to the last Rust.
This renames lib.rs to nalgebra.rs so that the generated *.so has the right name.
Add unchecked access to vector components on the Indexable trait.
Implement AbsoluteRotate for Identity.
Implement AbsoluteRotate for Identity.
Update to the last Rust.
Start implementation of quaternions.
Add a free function to prepend a rotation.
Add incomplete implementation of 4D rotation.
Add travis buid icon to the readme.
Replace std::num::One::one() by std::num::one() on examples.
Add travis.yml.
Switch to column-major representation.
Matrices are now column-major.
This will be useful to interop with opengl and lapack.
Make most out-of-place methods static.
This is to make people prefer the functional style.
Things like `a.dot(b)` dont make sense per se (there is no reason for `a` to have a different
status than `b`). Using static methods avoid this.
In-place methods are left unchanged.
Add methods to access a DVec<N> as a &[N].
Remove free-functions alliasing structures constructors.
Those constructors are not idiomatic. Use e.g. `Vec3::new(0, 0, 0)` instead.
Api change: deal with inplace/out of place methods.
Before, it was too easy to use an out of place method instead of the inplace one since they name
were pretty mutch the same. This kind of confusion may lead to silly bugs very hard to understand.
Thus the following changes have been made when a method is available both inplace and out-of-place:
* inplace version keep a short name.
* out-of-place version are suffixed by `_cpy` (meaning `copy`), and are static methods.
Methods applying transformations (rotation, translation or general transform) are now prefixed by
`append`, and a `prepend` version is available too.
Also, free functions doing in-place modifications dont really make sense. They have been removed.
Here are the naming changes:
* `invert` -> `inv`
* `inverted` -> `Inv::inv_cpy`
* `transpose` -> `transpose`
* `transposed` -> `Transpose::transpose_cpy`
* `transform_by` -> `append_transformation`
* `transformed` -> `Transform::append_transformation_cpy`
* `rotate_by` -> `apppend_rotation`
* `rotated` -> `Rotation::append_rotation_cpy`
* `translate_by` -> `apppend_translation`
* `translate` -> `Translation::append_translation_cpy`
* `normalized` -> `Norm::normalize_cpy`
* `rotated_wrt_point` -> `RotationWithTranslation::append_rotation_wrt_point_cpy`
* `rotated_wrt_center` -> `RotationWithTranslation::append_rotation_wrt_center_cpy`
Note that using those static methods is very verbose, and using in-place methods require an
explicit import of the related trait.
This is a way to convince the user to use free functions most of the time.
Replace `rust build` by `rustc`.
Dont re-export std::num::{Zero, One}.
This is useless.
Remove unused import.
Add a double-trait-dispatch-trick based cast trait
The Cast trait replaces both MatCast and VecCast.
Re-export the Identity type properly.
Re-add look_at methods for isometries.
Add a link to the on-line documentation.
Add a one-line description to each free-function.
This is better than nothing.
Update to the last Rust.
Also use free-functions on tests.
Use `use` instead of `pub use` to import modules on the examples.
Add the "nalgebra in use" part to the readme.
Fix the example given by the readme.
Fix typos on the readme.
Huge api change!
Everything changed, hopefully for the best.
* everything is accessible from the `na` module. It re-export
everything and provides free functions (i-e: na::dot(a, b) instead of
a.dot(b)) for most functionalities.
* matrix/vector adaptors (Rotmat, Transform) are replaced by plain
types: Rot{2, 3, 4} for rotation matrices and Iso{2, 3, 4} for
isometries (rotation + translation). This old adaptors system was to
hard to understand and to document.
* each file related to data structures moved to the `structs` folder.
This makes the doc a lot more readable and make people prefer the
`na` module instead of individual small modules.
* Because `na` exists now, the modules `structs::vec` and
`structs::mat` dont re-export anything now.
As a side effect, this makes the documentation more readable.
Add some impls for 4d rotations.
It is not possible to create a 4d rotation yet.
Add pointwise multiplication and division for vectors.
Move the Round trait inheritance from VecExt to AlgebraicVecExt.
What it the point of rounding an integer-valued vector?
Move the Basis trait inheritance from VecExt to AlgebraicVecExt.
The Basis trait cannot be implemented if the vector is not algebraic anyway.
Update the doc rule.
Add the frog to the project list.
Update to the last Rust: remove the float type.
Fix formatting on the README.
Improve the readme.
Minor doc improvements.
Update to the last Rust.
Update to the last Rust api.
RngUtils is dead.
rustdoc_ng became rustdoc.
Add mean and covariance computation for DMat.
This also fixes the transposition for rectangular DMat, and add scalar
addition/subtraction/multiplication/division for DMat.
Add the doc folder to the .gitignore.
Moved some files + use rustdoc_ng to generate the documenatiton.
Trait failes are merged in three files:
* operations.rs - for low-level matrix/vector operations
* geometry.rs - for operations with a clear, broadly known geometric meaning.
* structure.rs - for operations to access/alter the object inner structures.
Specialisations are moved to the `spec` folder.
Remove the redundant `Column` trait + Add unchecked access indexing to dynamic matrices/vectors.
Fix broken 2d rotation.
"Remove" the RMul and LMul trait. Use the regular Mul trait.
Those traits are not really removed since they are useful on generic code (to work around curret
limitations of rust traits system).
"Replaced" Scalar{Add, Sub, Mul, Div} by operator overloading.
Those traits are not really removed since rust cannot handle those multiple operator overloading
very well yet, making them sometimes unuseable on generic code.
Set up the hack to allow better overloads of the Mul trait.
This is strongly inpired by
http://smallcultfollowing.com/babysteps/blog/2012/10/04/refining-traits-slash-impls/
Specialized Mul, RMul, and LMul for Mat2 and Mat3.
More unsafe indexing in inner loops and add some benchmarks.
Add an unsafe `at_fast` method for unchecked read access to DVec and DMat.
Add unsafe methods to initialize a DVec or DMat without initialization.
Add a `new_random` method to build a `DMat` or `DVec` filled with random numbers.
Remove some useless #[test] tags.
Add `Absolute`, `Col`, `Mat`, `AbsoluteRotate` traits.
Traits like `AbsoluteRotate` and `RotationWithTranslation` have been moved to a `comp` folder
containing any trait providing operations which are combination of several traits.
Replace std::iterator by std::iter.
Implement `Norm` and `Dot` for `DVec`.
Add a `Dot` and a `Norm` trait for vectors having a dot product and a norm.
Those methods are not part of the `Vec` and `AlgebraicVec` traits any more.
Make the dot-product and normalization related methods public for DVec.
This will change soon with two traits: Dot and Norm.
Add a `Container` implementation for every vector.
Add `nrow()`, `ncols()` methods for `DMat`, and Container impl. for `DVec`.
Implement `UnitSphereSample` for `Vec1`.
Implement 3d rotation matrix -> axis angle conversion.
Cornercases are not handled correctly yet.
Update to the last rust.
Add more functions to initialize DMat and DVec.
Reexport `DMat` in mat.rs and `DVec` in vec.rs.
Swap the type parameters of `Transform`.
Add methods to set the translation/rotation/transformation directly.
Rename `Mat4::projection` to `mat4::new_perspective`.
Make DMat able to represent rectangular matrices.
The code is largely untested.
Add function to create a projection matrix.
Move all the rotation-related free functions to a `RotationWithTranslation` trait.
This is not a very good name though.
Rename the main module lib.rs.
This is a first step toward the use of rustpkg.
Add missing rotation-related functions.
Dont use globing `pub use`, they are buggy.
Move the `Outer` product trait to vec.rs
Make the `traits` module private.
Use `vec::Whatever` or `mat::Whatever` instead of `traits::whatever::Whatever`.
Rework the trait exports.
`use vec::an_operation` will import a vector-applicable operation trait.
`use mat::an_operation` will import a matrix-applicable operation trait.
Add a PVec3 type, for Padded Vector 3d.
This is the same as Vec3 but with an extra field for padding. This is useful for applications
needing a power-of-two number of arguments (typically mixed CPU/GPU applications).
The corresponding matrix is not yet implemented.
Improve how the dummy parameter are passed to the Dim::dim function.
Update to work with the last compiler.
Because of the unfortunate changes on type parameters resolution:
- the Dim trait now needs an useless parameter to infer the Self type.
- ApproxEps::epsilon() is broken.
Fix Transform adaptor ToHomogeneous implementation.
Add two traits: `CrossMatrix` and `Row`.
CrossMatrix is a trait for vectors having a cross product representable as a matrix.
Row is a trait for Matrixces and Vectors, to access (by index) their rows.
Add Rotate, Transform, Translate impl for vectors.
Add and `Identity` matrix type.
It implements most matrix traits but all its operations are no-ops.
Merge the Rotatable, Translatable, Transformable traits with their corresponding Rotation, Translation, Transformation.
Rework of the traits for Vectors.
The goal is to make traits less fine-grained for vectors, and reduce the amount of `use`.
- Scalar{Mul, Div} are removed, replaced by Mul<N, V> and Div<N, V>,
- Ring and DivisionRing are removed. Use Num instead.
- VectorSpace, Dot, and Norm are removed, replaced by the new, higher-level traits.
Add four traits:
- Vec: common operations on vectors. Replaces VectorSpace and Dot.
- AlgebraicVec: Vec + the old Norm trait.
- VecExt: Vec + every other traits vectors implement.
- AlgebraicVecExt: AlgebraicVec + VecExt.
Moved DivisionRing to ring.rs.
Add the ability to stop the basis internal itertors.
Changed the UniformSphereSample trait to return a borrowed vector.
Fix FromIterator impl.
Add `Round` impl for vectors.
Remove some unneded visibility modifiers.
Fix to work with the last Rust deriving.
Add Scalar{Mul, Div, Add, Sub} for matrices.
Add (pointwise) Add and Sub impl for matrices.
Add outer product.
Update to work with the last Rust api.
Add distcheck rule to the makefile.
Add missing #[inline] hints.
Further coding style fixes.
Fix curly braces.
Indentation fixes.
Add `Orderable` implementation for vectors.
The `min`, `max` and `clamp` methods are component-wise.
Fix `Ord` implementations to be a partial order.
When two elements are not comparable, all comparison operators return `false`.
Fix `for` loops (again) + `iterate` becomes `range`.
Fix `for` loops.
Changed mod visibilities + add doc for types.rs
for ... advance -> foreach ... in
Add missing type bounds.
Add static methods to build canonical axis.
For exemple use: Vec3::x() to create the vector Vec3::new(1.0, 0.0, 0.0).
The same aplies for y, z, w, etc.
Add documentation.
Replaced all remaining ocurences of from_homogeneous by from
from_homogeneous -> from
Add look_at_z.
Having a look_at which aligns the z-axis with the look_at direction is useful for cameras. It
will exist only in 3d.
Changed the semantic of the look_at method.
Before, the `look_at` method aligned the `z` axis with the look_at direction.
This will be problematic in the future if we want to generalize that on n-dimension (the z axis
could not axis at all when n < 3).
Now, the `look_at` method aligns the `x` axis with the look_at direction. Thus we have a chance for
it to be generalizable on n-dimension, `n >= 1`.
Fixed transposition.
Fix look_at.
Add traits MatCast and VecCast.
VecCast casts a Vec<N1> to a Vec<N2> with N1 and N2 bounded by NumCast.
MatCast casts a Mat<N1> to a Mat<N2> with N1 and N2 bounded by NumCast.
Add utility methods.
Added look_at for 3d rotation matrix and 3d transform.
Rotation matrices constructors are now the static methods Rotmat::from_angle,
Rotmat::from_axis_angle.
Add type aliases.
Add sphere sampling implementation for Vec3<f64>.
Merged the {vec, mat} and {vec, mat}_impl modules.
Flattened the `traits` submodules.
Add tests for vec0.
Add implementation of Vec0.
Fix sub_dot implementations.
Removed occurences of copy/Copy + improved api.
Now, access to vector components are x, y, z, w, a, b, ... instead of at[i].
The method at(i) has the same (read only) effect as the old at[i].
Now, access to matrix components are m11, m12, ... instead of mij[offset(i, j)]...
The method at((i, j)) has the same effect as the old mij[offset(i, j)].
Automatic implementation of all traits the compiler supports has been added on the #[deriving]
clause for both matrices and vectors.
invert -> inplace_inverse to avoid name clash with iterators.
abs needs the Signed trait.
Add Vec0.
Use Clone instead of Copy.
Add sphere sempling trait + Copy becomes Clone
map -> iter().transform
Basis trait now uses internal iterators to avoid allocations.
Fix bug when trying to create a rotation matrix with a zero angle.
More rotation sugar.
Add rotation wrt center of a matrix.
Add read-only access to a Rotmat subcomponents.
Add read-only accesse to a Transform subcomponents.
Changed the representation of rotations for 3D matrix.
Fix Column implementation generating an ICE.
Add Column implementations.
Fixes to work with the new compiler.
Add Column + Homogeneous + Indexable traits.
Column: to access a matrix column.
Homogeneous: to convert a matrix/vector from/to homogenous coordinates.
Indexable: to access a matrix/vector element using indices.
Reorganized files.
Refactor code for matrices.
Refactor vec{1, 2, 3} implemenation + add some useful traits.
#[inline(always)] -> #[inline]
Refined traits for rotation/translation/transformation.
Removed a lot of Copy + made Rotation and Translation more flexible.
Removed some useless references.
Fix some infinite recursion on nvec.
all -> iter().all
Coding style fix.
Fix to make it work with the new compiler.
Add implementation of Bounded.
workarounds -> traits. All ICE are now compiler errors.
Add Ord instances.
icomming -> master
Use new css for the doc.
Merge branch 'master' of github.com:sebcrozet/nalgebra
Add inlining pragmas.
Use bold font on readme.
Add compilation instructions.
Add DeltaTransformVector tait and fix transformation.
Add automatic implementation of VectorSpace.
Changed flattening function names.
Add flatten trait.
Used a better type parametter name.
Codding style fix.
The lib directory is automatically created.
Removed useless iterator usage.
Adapted to new vec iterator api.
Relaxed type constraints for transform rotation.
Primitive construction is more idiomatique using new.
Add rotation wrt a point.
Adapted for the compiler 'incomming' branch.
Fix matrix inversion algorithm.
Add dynamically sized matrix.
Add dynamically sized vector.
Use automatic ToStr deriving for everything.
Add SubDot trait and basic implementations.
Fix comment.
Refactored tests using macros.
Add comments and adapted to new rust syntax.
Add css file take from official rust repo.
Removed the triginometric trait workaround.
Add delta-transformation implementations.
Add delta-transformation.
Fix rotation for transform adaptor.
Add a test for the 2d rotation.
Add rotation and translation traits.
Removed useless use on the .rc.
Functions to build objects dont shadow constructors any more.
Refined ScalaOp trait.
Merge branch 'master' of github.com:sebcrozet/nalgebra
Removed useless loops on basis test.
Add tests and basis generation.
Removed disclaimer: there are some tests now!
Add rand for nvec.
Add Rand for nmat.
Fix readme for workarounds.
Add Rand implementation for everything.
Add fuzzy_eq implementation for everything.
Add comments for traits.
Adapted assertions with last rust zero-testing api.
Add one-dimensional primitives.
Add matrix adaptors and addapted to the now rust features.
Fix 2d matrix multiplication and 3d matrix inversion.
Replaced an uggly for by a bit less uggly while for the matrix inversion.
Add n-dimensional vector and matrix.
Reduced title level of Licence.
Add licence info.
Add short description on readme.
Addesome traits and configuration file.
Add basic operations.
Initial commit.