

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
VectorType
 Type of VectorSpaceEntryType
 Type of entry for the iteration@PublicationReference(author="Wikipedia", title="Vector space", type=WebPage, year=2011, url="http://en.wikipedia.org/wiki/Vector_space") public interface VectorSpace<VectorType extends VectorSpace<VectorType,?>,EntryType extends VectorSpace.Entry>
In the Foundry, a VectorSpace is a type of Ring that we can perform Vectorlike operations on: norm, distances between Vectors, etc.
Nested Class Summary  

static interface 
VectorSpace.Entry
Entry into the VectorSpace 
Method Summary  

double 
angle(VectorType other)
Computes the angle between two Vectors. 
double 
cosine(VectorType other)
Computes the cosine between two Vectors 
double 
dotProduct(VectorType other)
Inner Vector product between two Vectors 
double 
euclideanDistance(VectorType other)
Euclidean distance between this and other ,
which is the 2norm between the difference of the Vectors 
double 
euclideanDistanceSquared(VectorType other)
Squared Euclidean distance between this and
other , which is the 2norm between the difference of the
Vectors 
boolean 
isUnitVector()
Determines if this vector is a unit vector (norm2 = 1.0). 
boolean 
isUnitVector(double tolerance)
Determines if this vector is a unit vector within some tolerance for the 2norm. 
double 
norm(double power)
Returns the pnorm of the Vector with the given power. 
double 
norm1()
1norm of the vector (sum of absolute values in the vector) 
double 
norm2()
2norm of the vector (aka Euclidean distance of the vector) 
double 
norm2Squared()
Squared 2norm of the vector (aka squared Euclidean distance of the vector) 
double 
normInfinity()
Returns the infinity norm of the Vector, which is the maximum absolute value of an element in the Vector. 
double 
sum()
Computes the sum of the elements in the vector. 
VectorType 
unitVector()
Returns the unit vector of this vector. 
void 
unitVectorEquals()
Modifies this vector to be a the unit vector. 
Methods inherited from interface gov.sandia.cognition.math.Ring 

clone, 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 
Method Detail 

double sum()
double norm1()
double norm2()
double norm2Squared()
double normInfinity()
@PublicationReference(author="Wikipedia", title="Vector norm, pnorm", type=WebPage, year=2011, url="http://en.wikipedia.org/wiki/Vector_norm#pnorm") double norm(double power)
power
 Power to exponentiate each entry, must be greater than 0.0,
Double.POSITIVE_INFINITY
double dotProduct(VectorType other)
other
 the Vector with which to compute the dot product with this,
must be the same dimension as this
double angle(VectorType other)
other
 Another vector with which to compute the angle. Must be the same
dimensionality.
double cosine(VectorType other)
other
 another vector with which to compute the cosine, must be the
same dimension as this
double euclideanDistance(VectorType other)
this
and other
,
which is the 2norm between the difference of the Vectors
other
 Vector to which to compute the distance, must be the same
dimension as this
double euclideanDistanceSquared(VectorType other)
this
and
other
, which is the 2norm between the difference of the
Vectors
other
 Vector to which to compute the squared distance, must be the
same dimension as this
VectorType unitVector()
void unitVectorEquals()
boolean isUnitVector()
boolean isUnitVector(double tolerance)
tolerance
 The tolerance around 1.0 to allow the length.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 