Remove glob imports.

This commit is contained in:
Sébastien Crozet 2015-01-04 09:37:56 +01:00
parent 4979e3e6c3
commit 018d4a2ec0
18 changed files with 24 additions and 34 deletions

View File

@ -93,7 +93,7 @@ extern crate "rustc-serialize" as rustc_serialize;
extern crate test;
use std::cmp;
use std::ops::*;
use std::ops::Neg;
pub use traits::{
Absolute,
AbsoluteRotate,

View File

@ -2,7 +2,7 @@ use traits::operations::{Transpose, ApproxEq};
use traits::structure::{ColSlice, Eye, Indexable, Diag, SquareMat, BaseFloat};
use traits::geometry::Norm;
use std::cmp::min;
use std::ops::*;
use std::ops::{Mul, Add, Sub};
/// Get the householder matrix corresponding to a reflexion to the hyperplane
/// defined by `vec`. It can be a reflexion contained in a subspace.

View File

@ -6,7 +6,7 @@ use std::cmp;
use std::iter::repeat;
use std::rand::Rand;
use std::rand;
use std::ops::*;
use std::ops::{Add, Sub, Mul, Div, Index, IndexMut};
use traits::operations::ApproxEq;
use std::mem;
use structs::dvec::DVec;

View File

@ -7,7 +7,7 @@ use std::rand;
use std::slice::{Iter, IterMut};
use std::iter::FromIterator;
use std::iter::repeat;
use std::ops::*;
use std::ops::{Add, Sub, Mul, Div, Neg, Index, IndexMut};
use traits::operations::{ApproxEq, Axpy};
use traits::geometry::{Dot, Norm};
use traits::structure::{Iterable, IterableMut, Indexable, Shape, BaseFloat, BaseNum, Zero, One};

View File

@ -2,7 +2,7 @@
#![allow(missing_docs)]
use std::ops::*;
use std::ops::{Add, Sub, Mul};
use std::rand::{Rand, Rng};
use structs::mat::{Mat3, Mat4, Mat5};

View File

@ -2,8 +2,7 @@
#![allow(missing_docs)] // we allow missing to avoid having to document the mij components.
use std::ops::*;
use std::ops::{Add, Sub, Mul, Div, Index, IndexMut};
use std::mem;
use traits::operations::ApproxEq;
use std::slice::{Iter, IterMut};

View File

@ -5,7 +5,7 @@
use std::mem;
use std::slice::{Iter, IterMut};
use std::iter::{Iterator, FromIterator};
use std::ops::*;
use std::ops::{Add, Sub, Mul, Div, Neg, Index, IndexMut};
use traits::operations::{ApproxEq, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul,
ScalarDiv};
use traits::structure::{Cast, Dim, Indexable, Iterable, IterableMut, PntAsVec, Shape,

View File

@ -6,7 +6,7 @@ use std::mem;
use std::num;
use std::rand::{Rand, Rng};
use std::slice::{Iter, IterMut};
use std::ops::*;
use std::ops::{Add, Sub, Mul, Div, Neg, Index, IndexMut};
use std::iter::FromIterator;
use structs::{Vec3, Pnt3, Rot3, Mat3};
use traits::operations::{ApproxEq, Inv, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul,

View File

@ -2,8 +2,7 @@
#![allow(missing_docs)]
use std::ops::*;
use std::ops::{Mul, Neg, Index};
use std::rand::{Rand, Rng};
use traits::geometry::{Rotate, Rotation, AbsoluteRotate, RotationMatrix, Transform, ToHomogeneous,
Norm, Cross};

View File

@ -228,12 +228,6 @@ macro_rules! index_impl(
&self.submat[*i]
}
}
impl<N> IndexMut<(uint, uint), N> for $t<N> {
fn index_mut(&mut self, i: &(uint, uint)) -> &mut N {
&mut self.submat[*i]
}
}
)
);

View File

@ -1,9 +1,9 @@
use std::ops::Mul;
use structs::mat;
use traits::operations::{Inv, Transpose};
use traits::structure::{Zero, One};
use traits::geometry::{Translation, Translate, Rotation, Rotate, Transformation, Transform,
AbsoluteRotate};
use std::ops::*;
impl One for mat::Identity {
#[inline]

View File

@ -1,9 +1,9 @@
use std::ops::{Add, Mul};
use structs::vec::{Vec2, Vec3};
use structs::pnt::{Pnt2, Pnt3};
use structs::mat::{Mat1, Mat2, Mat3};
use traits::operations::{Inv, Det, ApproxEq};
use traits::structure::{Row, Col, BaseNum};
use std::ops::*;
// some specializations:
impl<N: BaseNum + ApproxEq<N>> Inv for Mat1<N> {

View File

@ -1,8 +1,8 @@
use std::ops::{Sub, Mul, Neg};
use traits::structure::{Cast, Row, Basis, BaseFloat, Zero, One};
use traits::geometry::{Norm, Cross, CrossMatrix, UniformSphereSample};
use structs::vec::{Vec1, Vec2, Vec3, Vec4};
use structs::mat::Mat3;
use std::ops::*;
impl<N: Copy + Mul<N, N> + Sub<N, N>> Cross<Vec1<N>> for Vec2<N> {
#[inline]

View File

@ -1,7 +1,7 @@
use std::ops::{Add, Sub, Mul, Div, Neg, Index, IndexMut};
use std::mem;
use std::slice::{Iter, IterMut};
use std::iter::{Iterator, FromIterator};
use std::ops::*;
use traits::operations::ApproxEq;
use traits::structure::{Iterable, IterableMut, Indexable, Basis, Dim, Shape, BaseFloat, BaseNum,
Zero, One, Bounded};

View File

@ -2,10 +2,10 @@
#![allow(missing_docs)] // we allow missing to avoid having to document the dispatch traits.
use std::ops::{Add, Sub, Mul, Div, Neg, Index, IndexMut};
use std::mem;
use std::slice::{Iter, IterMut};
use std::iter::{Iterator, FromIterator};
use std::ops::*;
use traits::operations::{ApproxEq, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul,
ScalarDiv, Absolute};
use traits::geometry::{Transform, Rotate, FromHomogeneous, ToHomogeneous, Dot, Norm,

View File

@ -1,7 +1,6 @@
//! Traits of operations having a well-known or explicit geometric meaning.
use std::ops::*;
use std::ops::Neg;
use traits::structure::{BaseFloat, Mat};
/// Trait of object which represent a translation, and to wich new translation

View File

@ -1,9 +1,8 @@
//! Low level operations on vectors and matrices.
use std::num::{Float, SignedInt};
use std::ops::*;
use std::cmp::*;
use std::cmp::Ordering::*;
use std::ops::Mul;
use std::cmp::Ordering;
use traits::structure::SquareMat;
/// Result of a partial ordering.
@ -53,9 +52,9 @@ impl POrdering {
/// Creates a `POrdering` from an `Ordering`.
pub fn from_ordering(ord: Ordering) -> POrdering {
match ord {
Less => POrdering::PartialLess,
Equal => POrdering::PartialEqual,
Greater => POrdering::PartialGreater
Ordering::Less => POrdering::PartialLess,
Ordering::Equal => POrdering::PartialEqual,
Ordering::Greater => POrdering::PartialGreater
}
}
@ -64,9 +63,9 @@ impl POrdering {
/// Returns `None` if `self` is `NotComparable`.
pub fn to_ordering(self) -> Option<Ordering> {
match self {
POrdering::PartialLess => Some(Less),
POrdering::PartialEqual => Some(Equal),
POrdering::PartialGreater => Some(Greater),
POrdering::PartialLess => Some(Ordering::Less),
POrdering::PartialEqual => Some(Ordering::Equal),
POrdering::PartialGreater => Some(Ordering::Greater),
POrdering::NotComparable => None
}
}

View File

@ -4,7 +4,7 @@ use std::f32;
use std::f64;
use std::num::{Int, Float, FloatMath};
use std::slice::{Iter, IterMut};
use std::ops::*;
use std::ops::{Add, Sub, Mul, Div, Neg, Rem, Index, IndexMut};
use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute};
use traits::geometry::{Dot, Norm, Orig};