Struct dimensioned::dimensioned::Dim
[−]
[src]
pub struct Dim<D: Dimension, V>(pub V, pub PhantomData<D>);
This is the primary struct that users of this library will interact with.
Methods
impl<D: Dimension, V> Dim<D, V>
fn new(v: V) -> Dim<D, V>
Construct a new dimensioned object
fn map<O, F: FnOnce(V) -> O>(self, f: F) -> Dim<D, O>
Maps a Dim
Trait Implementations
impl<D: Dimension, V> !NotDim for Dim<D, V>
impl<D, V> Sqrt for Dim<D, V> where D: RootDim<Two>, V: Float, D::Output: Dimension
impl<D, V> Cbrt for Dim<D, V> where D: RootDim<Three>, V: Float, D::Output: Dimension
impl<D, V> Display for Dim<D, V> where D: DimToString, V: Display
impl<D, V> Debug for Dim<D, V> where D: DimToString, V: Debug
impl<D, V> Octal for Dim<D, V> where D: DimToString, V: Octal
impl<D, V> LowerHex for Dim<D, V> where D: DimToString, V: LowerHex
impl<D, V> UpperHex for Dim<D, V> where D: DimToString, V: UpperHex
impl<D, V> Pointer for Dim<D, V> where D: DimToString, V: Pointer
impl<D, V> Binary for Dim<D, V> where D: DimToString, V: Binary
impl<D, V> LowerExp for Dim<D, V> where D: DimToString, V: LowerExp
impl<D, V> UpperExp for Dim<D, V> where D: DimToString, V: UpperExp
impl<Dl, Dr, Vl, Vr> PartialEq<Dim<Dr, Vr>> for Dim<Dl, Vl> where Dl: Dimension + KeepDim<Dr>, Dr: Dimension, Vl: PartialEq<Vr>
impl<D: Dimension + KeepDim, V: Eq> Eq for Dim<D, V>
impl<Dl, Dr, Vl, Vr> PartialOrd<Dim<Dr, Vr>> for Dim<Dl, Vl> where Dl: Dimension + KeepDim<Dr>, Dr: Dimension, Vl: PartialOrd<Vr>
fn partial_cmp(&self, other: &Dim<Dr, Vr>) -> Option<Ordering>
fn lt(&self, other: &Dim<Dr, Vr>) -> bool
fn le(&self, other: &Dim<Dr, Vr>) -> bool
fn gt(&self, other: &Dim<Dr, Vr>) -> bool
fn ge(&self, other: &Dim<Dr, Vr>) -> bool
impl<D: Dimension + KeepDim, V: Ord> Ord for Dim<D, V>
impl<Dl, Dr, Vl, Vr> Mul<Dim<Dr, Vr>> for Dim<Dl, Vl> where Dl: Dimension + MulDim<Dr>, Dr: Dimension, Vl: Mul<Vr>, Dl::Output: Dimension
Multiplying!
impl<D, V, RHS> Mul<RHS> for Dim<D, V> where D: Dimension, V: Mul<RHS>, RHS: NotDim
Scalar multiplication (with scalar on RHS)!
impl<Dl, Dr, Vl, Vr> Div<Dim<Dr, Vr>> for Dim<Dl, Vl> where Dl: Dimension + DivDim<Dr>, Dr: Dimension, Vl: Div<Vr>, Dl::Output: Dimension
Dividing!
type Output = Dim<Dl::Output, Vl::Output>
fn div(self, rhs: Dim<Dr, Vr>) -> Dim<Dl::Output, Vl::Output>
impl<D, V, RHS> Div<RHS> for Dim<D, V> where D: Dimension, V: Div<RHS>, RHS: NotDim
Scalar division (with scalar on RHS)!