gov.sandia.cognition.math.matrix
Interface Vector2D

All Superinterfaces:
Cloneable, CloneableSerializable, Iterable<VectorEntry>, Pair<Double,Double>, Ring<Vector>, Serializable, Vector, Vectorizable, VectorSpace<Vector,VectorEntry>
All Known Implementing Classes:
Vector2

public interface Vector2D
extends Vector, Pair<Double,Double>

An interface for a 2-dimensional vector. Adds convenience methods for accessing the two values (x, y).

Since:
3.0
Author:
Justin Basilico

Nested Class Summary
 
Nested classes/interfaces inherited from interface gov.sandia.cognition.math.matrix.VectorSpace
VectorSpace.Entry
 
Method Summary
 double getX()
          Gets the value of the first dimension (x).
 double getY()
          Gets the value of the second dimension (y).
 void setX(double x)
          Sets the value of the first dimension (x).
 void setXY(double x, double y)
          Sets the value of both dimensions of the vector.
 void setY(double y)
          Sets the value of the second dimension (y).
 
Methods inherited from interface gov.sandia.cognition.math.matrix.Vector
assertDimensionalityEquals, assertSameDimensionality, checkSameDimensionality, clone, dotDivide, dotDivideEquals, getDimensionality, getElement, isSparse, outerProduct, setElement, stack, subVector, times, toArray, toString, toString, toString, transform, transformEquals, transformNonZeros, transformNonZerosEquals
 
Methods inherited from interface gov.sandia.cognition.math.matrix.VectorSpace
angle, cosine, dotProduct, euclideanDistance, euclideanDistanceSquared, isUnitVector, isUnitVector, norm, norm1, norm2, norm2Squared, normInfinity, sum, unitVector, unitVectorEquals
 
Methods inherited from interface gov.sandia.cognition.math.Ring
dotTimes, dotTimesEquals, equals, equals, isZero, isZero, minus, minusEquals, negative, negativeEquals, plus, plusEquals, scale, scaledMinus, scaledMinusEquals, scaledPlus, scaledPlusEquals, scaleEquals, zero
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface gov.sandia.cognition.math.matrix.Vectorizable
convertFromVector, convertToVector
 
Methods inherited from interface gov.sandia.cognition.util.Pair
getFirst, getSecond
 

Method Detail

getX

double getX()
Gets the value of the first dimension (x).

Returns:
The value of the first dimension (x).

setX

void setX(double x)
Sets the value of the first dimension (x).

Parameters:
x - The value for the first dimension (x).

getY

double getY()
Gets the value of the second dimension (y).

Returns:
The value of the second dimension (y).

setY

void setY(double y)
Sets the value of the second dimension (y).

Parameters:
y - The value of the second dimension (y).

setXY

void setXY(double x,
           double y)
Sets the value of both dimensions of the vector.

Parameters:
x - The value of the first dimension (x).
y - The value of the second dimension (y).