Commit Graph

10 Commits

Author SHA1 Message Date
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 cead4f8410 Moved DivisionRing to ring.rs. 2013-08-17 17:50:01 +02:00
Sébastien Crozet 50a6454ae8 Add missing #[inline] hints. 2013-08-07 20:53:51 +02:00
Sébastien Crozet efd14f9e88 Further coding style fixes. 2013-08-05 10:15:11 +02:00
Sébastien Crozet c59911168e Fix curly braces. 2013-08-05 10:13:44 +02:00
Sébastien Crozet cf216f9b90 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.
2013-07-20 15:07:49 +02:00
Sébastien Crozet 8918cb5d7e invert -> inplace_inverse to avoid name clash with iterators. 2013-07-13 13:34:41 +00:00
Sébastien Crozet 6f081b70b8 Add sphere sempling trait + Copy becomes Clone 2013-07-04 14:23:08 +00:00
Sébastien Crozet c58e1ed40d Reorganized files. 2013-06-29 00:34:45 +00:00