Commit Graph

24 Commits

Author SHA1 Message Date
Sébastien Crozet
6dc8139794 "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).
2013-09-15 11:18:06 +02:00
Sébastien Crozet
514bf74efe "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.
2013-09-14 21:32:38 +02:00
Sébastien Crozet
e3a1d56e58 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/
2013-09-14 17:08:48 +02:00
Sébastien Crozet
1a08262f50 More unsafe indexing in inner loops and add some benchmarks. 2013-09-14 00:08:46 +02:00
Sébastien Crozet
6f81fc6d5c 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.
2013-09-13 10:26:19 +02:00
Sébastien Crozet
4e33b96aec Update to the last rust. 2013-09-07 17:26:05 +02:00
Sébastien Crozet
346a803b7f Improve how the dummy parameter are passed to the Dim::dim function. 2013-08-30 09:53:17 +02:00
Sébastien Crozet
82ddda154f 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.
2013-08-28 14:22:12 +02:00
Sébastien Crozet
7052aa88ee 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.
2013-08-25 23:01:44 +02:00
Sébastien Crozet
347883caa1 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.
2013-08-18 18:33:25 +02:00
Sébastien Crozet
a69f43bccd Remove some unneded visibility modifiers. 2013-08-14 09:43:02 +02:00
Sébastien Crozet
a46b063192 Add Scalar{Mul, Div, Add, Sub} for matrices. 2013-08-12 17:04:53 +02:00
Sébastien Crozet
037cf95542 Add (pointwise) Add and Sub impl for matrices. 2013-08-12 16:50:50 +02:00
Sébastien Crozet
b08a8384ae Add outer product. 2013-08-12 16:45:31 +02:00
Sébastien Crozet
3858c63291 Update to work with the last Rust api. 2013-08-11 16:07:34 +02:00
Sébastien Crozet
50a6454ae8 Add missing #[inline] hints. 2013-08-07 20:53:51 +02:00
Sébastien Crozet
c59911168e Fix curly braces. 2013-08-05 10:13:44 +02:00
Sébastien Crozet
a810bf6008 Indentation fixes. 2013-08-05 09:44:56 +02:00
Sébastien Crozet
50b34ca765 Fix for loops (again) + iterate becomes range. 2013-08-03 12:21:56 +02:00
Sébastien Crozet
67dea17abe for ... advance -> foreach ... in 2013-08-01 09:18:21 +02:00
Sébastien Crozet
6cf8db0926 Replaced all remaining ocurences of from_homogeneous by from 2013-07-23 23:28:02 +02:00
Sébastien Crozet
4ea1dd92e6 Fixed transposition. 2013-07-23 11:15:20 +02:00
Sébastien Crozet
e2f34023ed 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.
2013-07-22 23:42:35 +02:00
Sébastien Crozet
ff24f70332 Flattened the traits submodules. 2013-07-22 10:26:20 +02:00