squants

LengthVector

class LengthVector extends QuantityVector[Length]

Strategy #3 Prototype for implementations that support dimensional conversions

Implement a class representing the specific Quantity Vector that define the operations

Pros - requires no implicits

Cons - requires a new class for every quantity, clunkier to use

Linear Supertypes
QuantityVector[Length], Serializable, Serializable, Product, Equals, Vector[Length], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LengthVector
  2. QuantityVector
  3. Serializable
  4. Serializable
  5. Product
  6. Equals
  7. Vector
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LengthVector(lengths: Length*)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def #*: (Vector[Double]) ⇒ Vector[Length]

    crossProduct

    crossProduct

    Definition Classes
    Vector
  5. def *(that: Area): QuantityVector[Volume]

  6. def *(that: Length): AreaVector

  7. def *[B <: Quantity[B], C <: Quantity[C]](that: B)(implicit mapTo: (Length, B) ⇒ C): QuantityVector[C]

    Definition Classes
    QuantityVector
  8. def *(that: Vector[Double]): Length

    dotProduct

    dotProduct

    Definition Classes
    Vector
  9. def *: (Double) ⇒ Vector[Length]

    times

    times

    Definition Classes
    Vector
  10. def +: (Vector[Length]) ⇒ Vector[Length]

    plus

    plus

    Definition Classes
    Vector
  11. def -: (Vector[Length]) ⇒ Vector[Length]

    minus

    minus

    Definition Classes
    Vector
  12. def /[B <: Quantity[B], C <: Quantity[C]](that: B)(implicit mapTo: (Length, B) ⇒ C): QuantityVector[C]

    Definition Classes
    QuantityVector
  13. def /(that: Length): DoubleVector

    divide

    divide

    Definition Classes
    QuantityVector
  14. def /(that: Double): Vector[Length]

    divide

    divide

    Definition Classes
    Vector
  15. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  17. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  18. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. val coordinates: Length*

    The list values that makeup Vector's coordinates

    The list values that makeup Vector's coordinates

    returns

    Definition Classes
    QuantityVectorVector
  20. def crossProduct(that: Vector[Double]): Vector[Length]

    Create the Cross Product of two Vectors

    Create the Cross Product of two Vectors

    that

    Vector[A]

    returns

    Definition Classes
    QuantityVectorVector
  21. def divide[B <: Quantity[B], C <: Quantity[C]](that: B)(implicit mapTo: (Length, B) ⇒ C): QuantityVector[C]

    Definition Classes
    QuantityVector
  22. def divide(that: Length): DoubleVector

    Reduce and "de-unit" a Vector.

    Reduce and "de-unit" a Vector. Returns a DoubleVector

    that

    Quantity[A]

    returns

    Definition Classes
    QuantityVector
  23. def divide(that: Double): Vector[Length]

    Reduce a Vector

    Reduce a Vector

    that

    Double

    returns

    Definition Classes
    QuantityVectorVector
  24. def dotProduct[B <: Quantity[B], C <: Quantity[C]](that: Vector[B])(implicit mapTo: (Length, B) ⇒ C, num: Numeric[C]): C

    Definition Classes
    QuantityVector
  25. def dotProduct(that: Vector[Double]): Length

    Create the Dot Product of two Vectors

    Create the Dot Product of two Vectors

    that

    Vector[A]

    returns

    Definition Classes
    QuantityVectorVector
  26. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. def magnitude: Length

    The scalar value of the Vector

    The scalar value of the Vector

    returns

    Definition Classes
    QuantityVectorVector
  31. def minus(that: Vector[Length]): Vector[Length]

    Subtract two Vectors

    Subtract two Vectors

    that

    Vector[A]

    returns

    Definition Classes
    QuantityVectorVector
  32. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  33. def normalize(unit: UnitOfMeasure[Length]): Vector[Length]

    Creates the Unit Vector which corresponds to this vector using the given unit

    Creates the Unit Vector which corresponds to this vector using the given unit

    returns

    Definition Classes
    QuantityVector
  34. def normalize: Vector[Length]

    Creates the Unit Vector which corresponds to this vector

    Creates the Unit Vector which corresponds to this vector

    returns

    Definition Classes
    QuantityVectorVector
  35. final def notify(): Unit

    Definition Classes
    AnyRef
  36. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  37. def plus(that: Vector[Length]): Vector[Length]

    Add two Vectors

    Add two Vectors

    that

    Vector[A]

    returns

    Definition Classes
    QuantityVectorVector
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def times[B <: Quantity[B], C <: Quantity[C]](that: B)(implicit mapTo: (Length, B) ⇒ C): QuantityVector[C]

    Strategy #1 Prototype for implementation that support dimensional conversion

    Strategy #1 Prototype for implementation that support dimensional conversion

    Implement abstract methods here that use implicit mapTo function to perform the dimensional operation

    Pros - requires no implicit classes or extended case classes, it will be much easier to implement divide, dotProduct and crossProduct

    Cons - requires implicit conversion to be in scope

    Definition Classes
    QuantityVector
  40. def times(that: Double): Vector[Length]

    Scale a Vector

    Scale a Vector

    that

    Double

    returns

    Definition Classes
    QuantityVectorVector
  41. def to(unit: UnitOfMeasure[Length]): DoubleVector

    Returns a DoubleVector representing the quantity values in terms of the supplied unit

    Returns a DoubleVector representing the quantity values in terms of the supplied unit

    unit

    UnitOfMeasure[A]

    returns

    Definition Classes
    QuantityVector
  42. def valueUnit: UnitOfMeasure[Length]

    Definition Classes
    QuantityVector
  43. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from QuantityVector[Length]

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Vector[Length]

Inherited from AnyRef

Inherited from Any

Ungrouped