Rename: VecExt -> AnyVecExt, PntExt -> AnyPntExt.

This commit is contained in:
Sébastien Crozet 2014-10-21 09:21:16 +02:00
parent 25f564128b
commit 2f273d655a
3 changed files with 18 additions and 18 deletions

View File

@ -114,8 +114,10 @@ pub use traits::{PartialLess, PartialEqual, PartialGreater, NotComparable};
pub use traits::{ pub use traits::{
Absolute, Absolute,
AbsoluteRotate, AbsoluteRotate,
AnyVec,
AnyPnt, AnyPnt,
AnyPntExt,
AnyVec,
AnyVecExt,
ApproxEq, ApproxEq,
Axpy, Axpy,
Basis, Basis,
@ -148,7 +150,6 @@ pub use traits::{
PartialOrd, PartialOrd,
PartialOrdering, PartialOrdering,
PntAsVec, PntAsVec,
PntExt,
RMul, RMul,
Rotate, Rotation, RotationMatrix, RotationWithTranslation, Rotate, Rotation, RotationMatrix, RotationWithTranslation,
Row, Row,
@ -159,8 +160,7 @@ pub use traits::{
Translate, Translation, Translate, Translation,
Transpose, Transpose,
UniformSphereSample, UniformSphereSample,
VecAsPnt, VecAsPnt
VecExt
}; };
pub use structs::{ pub use structs::{

View File

@ -5,8 +5,8 @@ pub use self::geometry::{AbsoluteRotate, Cross, CrossMatrix, Dot, FromHomogeneou
Transform, Transformation, Translate, Translation, UniformSphereSample}; Transform, Transformation, Translate, Translation, UniformSphereSample};
pub use self::structure::{FloatVec, FloatVecExt, FloatPnt, FloatPntExt, Basis, Cast, Col, Dim, pub use self::structure::{FloatVec, FloatVecExt, FloatPnt, FloatPntExt, Basis, Cast, Col, Dim,
Indexable, Iterable, IterableMut, Mat, Row, AnyVec, VecExt, AnyPnt, Indexable, Iterable, IterableMut, Mat, Row, AnyVec, AnyVecExt, AnyPnt,
PntExt, PntAsVec, VecAsPnt, ColSlice, RowSlice, Diag, Eye}; AnyPntExt, PntAsVec, VecAsPnt, ColSlice, RowSlice, Diag, Eye};
pub use self::operations::{Absolute, ApproxEq, Axpy, Cov, Det, Inv, LMul, Mean, Outer, PartialOrd, pub use self::operations::{Absolute, ApproxEq, Axpy, Cov, Det, Inv, LMul, Mean, Outer, PartialOrd,
RMul, ScalarAdd, ScalarSub, ScalarMul, ScalarDiv, Transpose}; RMul, ScalarAdd, ScalarSub, ScalarMul, ScalarDiv, Transpose};

View File

@ -166,13 +166,13 @@ pub trait FloatVec<N: Float>: AnyVec<N> + Norm<N> {
/// Trait grouping uncommon, low-level and borderline (from the mathematical point of view) /// Trait grouping uncommon, low-level and borderline (from the mathematical point of view)
/// operations on vectors. /// operations on vectors.
pub trait VecExt<N>: AnyVec<N> + Indexable<uint, N> + Iterable<N> + pub trait AnyVecExt<N>: AnyVec<N> + Indexable<uint, N> + Index<uint, N> + IndexMut<uint, N> +
UniformSphereSample + ScalarAdd<N> + ScalarSub<N> + Bounded Iterable<N> + UniformSphereSample + ScalarAdd<N> + ScalarSub<N> + Bounded
{ } { }
/// Trait grouping uncommon, low-level and borderline (from the mathematical point of view) /// Trait grouping uncommon, low-level and borderline (from the mathematical point of view)
/// operations on vectors. /// operations on vectors.
pub trait FloatVecExt<N: Float>: FloatVec<N> + VecExt<N> + Basis { } pub trait FloatVecExt<N: Float>: FloatVec<N> + AnyVecExt<N> + Basis { }
impl<N, V: Dim + Sub<V, V> + Add<V, V> + Neg<V> + Zero + PartialEq + Mul<N, V> + Div<N, V> + Dot<N> + Axpy<N>> impl<N, V: Dim + Sub<V, V> + Add<V, V> + Neg<V> + Zero + PartialEq + Mul<N, V> + Div<N, V> + Dot<N> + Axpy<N>>
AnyVec<N> for V { } AnyVec<N> for V { }
@ -180,11 +180,11 @@ AnyVec<N> for V { }
impl<N: Float, V: AnyVec<N> + Norm<N>> FloatVec<N> for V { } impl<N: Float, V: AnyVec<N> + Norm<N>> FloatVec<N> for V { }
impl<N, impl<N,
V: AnyVec<N> + Indexable<uint, N> + Iterable<N> + V: AnyVec<N> + Indexable<uint, N> + Index<uint, N> + IndexMut<uint, N> + Iterable<N> +
UniformSphereSample + ScalarAdd<N> + ScalarSub<N> + Bounded> UniformSphereSample + ScalarAdd<N> + ScalarSub<N> + Bounded>
VecExt<N> for V { } AnyVecExt<N> for V { }
impl<N: Float, V: FloatVec<N> + VecExt<N> + Basis> FloatVecExt<N> for V { } impl<N: Float, V: FloatVec<N> + AnyVecExt<N> + Basis> FloatVecExt<N> for V { }
/* /*
* Pnt related traits. * Pnt related traits.
@ -228,18 +228,18 @@ pub trait FloatPnt<N: Float, V: Norm<N>>: AnyPnt<N, V> {
/// Trait grouping uncommon, low-level and borderline (from the mathematical point of view) /// Trait grouping uncommon, low-level and borderline (from the mathematical point of view)
/// operations on points. /// operations on points.
pub trait PntExt<N, V>: AnyPnt<N, V> + Indexable<uint, N> + Iterable<N> + pub trait AnyPntExt<N, V>: AnyPnt<N, V> + Indexable<uint, N> + Index<uint, N> + IndexMut<uint, N> +
ScalarAdd<N> + ScalarSub<N> + Bounded + Axpy<N> Iterable<N> + ScalarAdd<N> + ScalarSub<N> + Bounded + Axpy<N>
{ } { }
/// Trait grouping uncommon, low-level and borderline (from the mathematical point of view) /// Trait grouping uncommon, low-level and borderline (from the mathematical point of view)
/// operations on points. /// operations on points.
pub trait FloatPntExt<N: Float, V: Norm<N>> : FloatPnt<N, V> + PntExt<N, V> { } pub trait FloatPntExt<N: Float, V: Norm<N>> : FloatPnt<N, V> + AnyPntExt<N, V> { }
impl<N, V, P: PntAsVec<V> + Dim + Sub<P, V> + Add<V, P> + Orig + Neg<P> + PartialEq + Mul<N, P> + Div<N, P>> impl<N, V, P: PntAsVec<V> + Dim + Sub<P, V> + Add<V, P> + Orig + Neg<P> + PartialEq + Mul<N, P> + Div<N, P>>
AnyPnt<N, V> for P { } AnyPnt<N, V> for P { }
impl<N: Float, V: Norm<N>, P: AnyPnt<N, V>> FloatPnt<N, V> for P { } impl<N: Float, V: Norm<N>, P: AnyPnt<N, V>> FloatPnt<N, V> for P { }
impl<N, V, P: AnyPnt<N, V> + Indexable<uint, N> + Iterable<N> + ScalarAdd<N> + ScalarSub<N> + Bounded + Axpy<N>> impl<N, V, P: AnyPnt<N, V> + Indexable<uint, N> + Index<uint, N> + IndexMut<uint, N> + Iterable<N> + ScalarAdd<N> + ScalarSub<N> + Bounded + Axpy<N>>
PntExt<N, V> for P { } AnyPntExt<N, V> for P { }
impl<N: Float, V: Norm<N>, P: FloatPnt<N, V> + PntExt<N, V>> FloatPntExt<N, V> for P { } impl<N: Float, V: Norm<N>, P: FloatPnt<N, V> + AnyPntExt<N, V>> FloatPntExt<N, V> for P { }