2013-05-21 23:25:01 +08:00
|
|
|
/*!
|
|
|
|
|
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 21:07:49 +08:00
|
|
|
# A n-dimensional linear algebra library.
|
2013-05-21 23:25:01 +08:00
|
|
|
|
|
|
|
*/
|
2013-05-15 05:08:29 +08:00
|
|
|
#[link(name = "nalgebra"
|
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 21:07:49 +08:00
|
|
|
, vers = "0.1"
|
2013-05-15 05:08:29 +08:00
|
|
|
, author = "Sébastien Crozet"
|
|
|
|
, uuid = "1E96070F-4778-4EC1-B080-BF69F7048216")];
|
|
|
|
#[crate_type = "lib"];
|
|
|
|
#[warn(non_camel_case_types)]
|
|
|
|
|
|
|
|
extern mod std;
|
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 21:07:49 +08:00
|
|
|
extern mod extra;
|
2013-05-15 05:08:29 +08:00
|
|
|
|
2013-07-22 16:26:20 +08:00
|
|
|
mod dmat;
|
|
|
|
mod dvec;
|
|
|
|
mod vec_impl;
|
|
|
|
mod mat_impl;
|
2013-05-15 05:08:29 +08:00
|
|
|
|
2013-06-29 08:34:45 +08:00
|
|
|
// specialization for some 1d, 2d and 3d operations
|
|
|
|
pub mod mat_spec;
|
|
|
|
pub mod vec_spec;
|
2013-07-20 22:32:39 +08:00
|
|
|
pub mod vec0_spec;
|
2013-05-15 05:08:29 +08:00
|
|
|
|
2013-05-21 23:25:01 +08:00
|
|
|
/// Wrappers around raw matrices to restrict their behaviour.
|
|
|
|
pub mod adaptors
|
2013-05-17 05:30:39 +08:00
|
|
|
{
|
2013-05-21 23:25:01 +08:00
|
|
|
pub mod rotmat;
|
|
|
|
pub mod transform;
|
2013-05-17 05:30:39 +08:00
|
|
|
}
|
|
|
|
|
2013-07-22 16:26:20 +08:00
|
|
|
pub mod vec
|
|
|
|
{
|
|
|
|
pub use vec_impl::*;
|
|
|
|
pub use dvec::*;
|
|
|
|
pub use traits::sample::*;
|
|
|
|
pub use traits::dot::*;
|
|
|
|
pub use traits::cross::*;
|
|
|
|
pub use traits::basis::*;
|
|
|
|
pub use traits::norm::*;
|
|
|
|
pub use traits::vector_space::*;
|
|
|
|
pub use traits::sub_dot::*;
|
|
|
|
pub use traits::scalar_op::*;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub mod mat
|
|
|
|
{
|
|
|
|
pub use mat_impl::*;
|
|
|
|
pub use dmat::*;
|
|
|
|
pub use traits::column::*;
|
|
|
|
pub use traits::inv::*;
|
|
|
|
pub use traits::transpose::*;
|
|
|
|
pub use traits::rotation::*;
|
|
|
|
pub use traits::translation::*;
|
|
|
|
pub use traits::transformation::*;
|
|
|
|
}
|
|
|
|
|
2013-05-21 23:25:01 +08:00
|
|
|
/// Useful linear-algebra related traits.
|
|
|
|
pub mod traits
|
2013-05-15 05:08:29 +08:00
|
|
|
{
|
2013-07-22 16:26:20 +08:00
|
|
|
pub use traits::indexable::*;
|
|
|
|
pub use traits::iterable::*;
|
|
|
|
pub use traits::dim::*;
|
|
|
|
pub use traits::ring::*;
|
|
|
|
pub use traits::division_ring::*;
|
|
|
|
pub use traits::rlmul::*;
|
|
|
|
pub use traits::homogeneous::*;
|
|
|
|
|
2013-07-04 22:23:08 +08:00
|
|
|
pub mod sample;
|
2013-06-29 19:40:31 +08:00
|
|
|
pub mod indexable;
|
|
|
|
pub mod column;
|
2013-06-29 05:03:40 +08:00
|
|
|
pub mod iterable;
|
2013-05-21 23:25:01 +08:00
|
|
|
pub mod dot;
|
|
|
|
pub mod cross;
|
|
|
|
pub mod inv;
|
|
|
|
pub mod transpose;
|
|
|
|
pub mod dim;
|
|
|
|
pub mod basis;
|
|
|
|
pub mod norm;
|
|
|
|
pub mod rotation;
|
|
|
|
pub mod translation;
|
2013-06-28 00:16:07 +08:00
|
|
|
pub mod transformation;
|
2013-05-21 23:25:01 +08:00
|
|
|
pub mod vector_space;
|
|
|
|
pub mod ring;
|
|
|
|
pub mod division_ring;
|
2013-05-25 21:51:51 +08:00
|
|
|
pub mod sub_dot;
|
2013-06-16 04:16:44 +08:00
|
|
|
pub mod rlmul;
|
|
|
|
pub mod scalar_op;
|
2013-06-29 19:40:31 +08:00
|
|
|
pub mod homogeneous;
|
2013-05-15 05:08:29 +08:00
|
|
|
}
|
2013-05-19 01:04:03 +08:00
|
|
|
|
2013-05-21 23:25:01 +08:00
|
|
|
#[cfg(test)]
|
|
|
|
pub mod tests
|
2013-05-19 01:04:03 +08:00
|
|
|
{
|
2013-05-21 23:25:01 +08:00
|
|
|
pub mod mat;
|
|
|
|
pub mod vec;
|
2013-05-19 01:04:03 +08:00
|
|
|
}
|