Package wsh.opt
Interface VectConst
-
- All Superinterfaces:
java.lang.Cloneable
,java.io.Serializable
- All Known Subinterfaces:
Vect
- All Known Implementing Classes:
ArrayVect1
public interface VectConst extends java.lang.Cloneable, java.io.Serializable
Vector operations that do not change the state of the vector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vect
clone()
double
dot(VectConst other)
Return the Cartesian dot product of this vector with another vector (not including any inverse covariance).double
magnitude()
This is the dot product of the vector with itself premultiplied by the inverse covariance.
-
-
-
Method Detail
-
dot
double dot(VectConst other)
Return the Cartesian dot product of this vector with another vector (not including any inverse covariance). [Feel free to normalize by the number of elements in the array, if the inverse convariance is defined consistently.]- Parameters:
other
- The vector to be dotted.- Returns:
- The dot product.
-
magnitude
double magnitude()
This is the dot product of the vector with itself premultiplied by the inverse covariance. If the inverse covariance is an identity, then the result is just the dot product with itself. Equivalently,Vect vect = (Vect) this.clone(); vect.multiplyInverseCovariance(); return this.dot(vect);
But you can usually avoid the clone.- Returns:
- magnitude of vector.
-
clone
Vect clone()
-
-