upstream rust: std::{ops,cmp} traits no longer in prelude
This commit is contained in:
parent
38916d3d2f
commit
d5742d75de
|
@ -92,6 +92,8 @@ extern crate "rustc-serialize" as rustc_serialize;
|
|||
extern crate test;
|
||||
|
||||
use std::cmp;
|
||||
use std::ops::Neg;
|
||||
|
||||
pub use traits::{
|
||||
Absolute,
|
||||
AbsoluteRotate,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use std::ops::{Add,Sub,Mul};
|
||||
use traits::operations::{Transpose, ApproxEq};
|
||||
use traits::structure::{ColSlice, Eye, Indexable, Diag, SquareMat, BaseFloat};
|
||||
use traits::geometry::Norm;
|
||||
|
|
|
@ -9,6 +9,7 @@ use std::rand;
|
|||
use traits::operations::ApproxEq;
|
||||
use std::mem;
|
||||
use structs::dvec::DVec;
|
||||
use std::ops::{Index,IndexMut,Add,Sub,Mul,Div};
|
||||
use traits::operations::{Inv, Transpose, Mean, Cov};
|
||||
use traits::structure::{Cast, ColSlice, RowSlice, Diag, Eye, Indexable, Shape, Zero, One, BaseNum};
|
||||
use std::fmt::{Show, Formatter, Result};
|
||||
|
|
|
@ -7,6 +7,7 @@ use std::rand;
|
|||
use std::slice::{Iter, IterMut};
|
||||
use std::iter::FromIterator;
|
||||
use std::iter::repeat;
|
||||
use std::ops::{Index,IndexMut,Add,Sub,Mul,Div,Neg};
|
||||
use traits::operations::{ApproxEq, Axpy};
|
||||
use traits::geometry::{Dot, Norm};
|
||||
use traits::structure::{Iterable, IterableMut, Indexable, Shape, BaseFloat, BaseNum, Zero, One};
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#![allow(missing_docs)]
|
||||
|
||||
use std::rand::{Rand, Rng};
|
||||
use std::ops::{Add,Sub,Mul};
|
||||
use structs::mat::{Mat3, Mat4, Mat5};
|
||||
use traits::structure::{Cast, Dim, Col, BaseFloat, BaseNum, One};
|
||||
use traits::operations::{Inv, ApproxEq};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use std::mem;
|
||||
use traits::operations::ApproxEq;
|
||||
use std::slice::{Iter, IterMut};
|
||||
use std::ops::{Index,IndexMut,Add,Sub,Mul,Div};
|
||||
use structs::vec::{Vec1, Vec2, Vec3, Vec4, Vec5, Vec6};
|
||||
use structs::pnt::{Pnt1, Pnt4, Pnt5, Pnt6};
|
||||
use structs::dvec::{DVec1, DVec2, DVec3, DVec4, DVec5, DVec6};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use std::mem;
|
||||
use std::slice::{Iter, IterMut};
|
||||
use std::iter::{Iterator, FromIterator};
|
||||
use std::ops::{Index,IndexMut,Add,Sub,Mul,Div,Neg};
|
||||
use traits::operations::{ApproxEq, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul,
|
||||
ScalarDiv};
|
||||
use traits::structure::{Cast, Dim, Indexable, Iterable, IterableMut, PntAsVec, Shape,
|
||||
|
|
|
@ -6,6 +6,7 @@ use std::mem;
|
|||
use std::num;
|
||||
use std::rand::{Rand, Rng};
|
||||
use std::slice::{Iter, IterMut};
|
||||
use std::ops::{Index,IndexMut,Add,Sub,Mul,Div,Neg};
|
||||
use structs::{Vec3, Pnt3, Rot3, Mat3};
|
||||
use traits::operations::{ApproxEq, Inv, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul,
|
||||
ScalarDiv};
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#![allow(missing_docs)]
|
||||
|
||||
use std::rand::{Rand, Rng};
|
||||
use std::ops::{Index,IndexMut,Mul,Neg};
|
||||
use traits::geometry::{Rotate, Rotation, AbsoluteRotate, RotationMatrix, Transform, ToHomogeneous,
|
||||
Norm, Cross};
|
||||
use traits::structure::{Cast, Dim, Row, Col, BaseFloat, BaseNum, Zero, One};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use structs::mat;
|
||||
use std::ops::{Mul};
|
||||
use traits::operations::{Inv, Transpose};
|
||||
use traits::structure::{Zero, One};
|
||||
use traits::geometry::{Translation, Translate, Rotation, Rotate, Transformation, Transform,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use std::ops::{Add,Mul};
|
||||
use structs::vec::{Vec2, Vec3};
|
||||
use structs::pnt::{Pnt2, Pnt3};
|
||||
use structs::mat::{Mat1, Mat2, Mat3};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
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};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use std::mem;
|
||||
use std::slice::{Iter, IterMut};
|
||||
use std::iter::{Iterator, FromIterator};
|
||||
use std::ops::{Index,IndexMut,Add,Sub,Mul,Div,Neg};
|
||||
use traits::operations::ApproxEq;
|
||||
use traits::structure::{Iterable, IterableMut, Indexable, Basis, Dim, Shape, BaseFloat, BaseNum,
|
||||
Zero, One, Bounded};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use std::mem;
|
||||
use std::slice::{Iter, IterMut};
|
||||
use std::iter::{Iterator, FromIterator};
|
||||
use std::ops::{Index,IndexMut,Add,Sub,Mul,Div,Neg};
|
||||
use traits::operations::{ApproxEq, POrd, POrdering, Axpy, ScalarAdd, ScalarSub, ScalarMul,
|
||||
ScalarDiv, Absolute};
|
||||
use traits::geometry::{Transform, Rotate, FromHomogeneous, ToHomogeneous, Dot, Norm,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! Traits of operations having a well-known or explicit geometric meaning.
|
||||
|
||||
|
||||
use std::ops::{Neg};
|
||||
use traits::structure::{BaseFloat, Mat};
|
||||
|
||||
/// Trait of object which represent a translation, and to wich new translation
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
//! Low level operations on vectors and matrices.
|
||||
|
||||
use std::ops::{Mul};
|
||||
use std::cmp::{Ordering};
|
||||
use std::num::{Float, SignedInt};
|
||||
use traits::structure::SquareMat;
|
||||
|
||||
|
@ -50,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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ use std::f32;
|
|||
use std::f64;
|
||||
use std::num::{Int, Float, FloatMath};
|
||||
use std::slice::{Iter, IterMut};
|
||||
use std::ops::{Index,IndexMut,Add,Sub,Mul,Div,Rem,Neg};
|
||||
use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute};
|
||||
use traits::geometry::{Dot, Norm, Orig};
|
||||
|
||||
|
|
Loading…
Reference in New Issue