QuantityVector

case class QuantityVector[A <: Quantity[A]](coordinates: A*) extends SVector[A]

Quantity Vector

Quantity Vector

Type Params
A

QuantityType

Value Params
coordinates

Variable list of A

Authors

garyKeorkunian

Since

0.3.0

trait Serializable
trait Product
trait Equals
trait SVector[A]
class Object
trait Matchable
class Any

Type members

Types

Value members

Concrete methods

def /(that: A): DoubleVector
def angle(coordinateX: Int, coordinateY: Int, unit: AngleUnit): Angle
def divide(that: Double): SVectorType
def divide(that: A): DoubleVector
def dotProduct(that: DoubleVector): A
def in(uom: UnitOfMeasure[A]): QuantityVector[A]

Returns a QuantityVector with all coordinates set to the supplied unit

Returns a QuantityVector with all coordinates set to the supplied unit

Value Params
uom

UnitOfMeasure[A]

def magnitude: A
def map[B <: Double](f: A => Double): DoubleVector

Creates a DoubleVector by mapping over each coordinate with the supplied function

Creates a DoubleVector by mapping over each coordinate with the supplied function

Value Params
f

A => Double map function

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

def times(that: Double): SVectorType

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

Value Params
uom

UnitOfMeasure[A]

Inherited methods

def #*: DoubleVector => SVector[A]
Inherited from
SVector
def *(that: DoubleVector): A
Inherited from
SVector
def *(that: Double): SVectorType
Inherited from
SVector
Inherited from
SVector
Inherited from
SVector
def /(that: Double): SVectorType
Inherited from
SVector
def polar(coordinateX: Int, coordinateY: Int, unit: AngleUnit): (A, Angle)

The polar coordinates (r, theta) of the two Cartesian coordinates at the supplied indices

The polar coordinates (r, theta) of the two Cartesian coordinates at the supplied indices

Value Params
coordinateX

index of the abscissa coordinate (defaults to 0)

coordinateY

index of the ordinate coordinate (defaults to 1)

unit

unit for the angle (theta) component (defaults to Radians)

Returns

(A, Angle)

Inherited from
SVector
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product