diff --git a/src/traits/delta_transform.rs b/src/traits/delta_transform.rs new file mode 100644 index 00000000..93bd96a9 --- /dev/null +++ b/src/traits/delta_transform.rs @@ -0,0 +1,10 @@ +/// A delta-transformation is the generalization of rotation. A delta transform +/// can apply any transformation to the object without translating it. +/// In partilular, 0 is neutral wrt. the delta-transform. +pub trait DeltaTransform
+{ + /// Extracts the delta transformation associated with this transformation. + fn delta_transform(&self) -> DT; + // FIXME: add functions to apply the delta-transform to a vector without + // explicit computation of the transform (does this avoid some matrix copy?) +} diff --git a/src/traits/division_ring.rs b/src/traits/division_ring.rs new file mode 100644 index 00000000..ae1d3f5f --- /dev/null +++ b/src/traits/division_ring.rs @@ -0,0 +1,4 @@ +use traits::ring::Ring; + +pub trait DivisionRing : Ring + Quot +{ } diff --git a/src/traits/ring.rs b/src/traits/ring.rs new file mode 100644 index 00000000..418b4af0 --- /dev/null +++ b/src/traits/ring.rs @@ -0,0 +1,5 @@ +use core::num::{One, Zero}; + +pub trait Ring : +Sub + Add + Neg + Mul + One + Zero +{ } diff --git a/src/traits/vector_space.rs b/src/traits/vector_space.rs new file mode 100644 index 00000000..986bd0a2 --- /dev/null +++ b/src/traits/vector_space.rs @@ -0,0 +1,7 @@ +use core::num::Zero; +use traits::division_ring::DivisionRing; +use traits::workarounds::scalar_op::{ScalarMul, ScalarDiv}; + +pub trait VectorSpace : Sub + Add + + Neg + Zero + ScalarMul + ScalarDiv +{ }