|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.systemsbiology.gaggle.experiment.gui.vectormath.ReadOnlyMathVector
public class ReadOnlyMathVector
Implementation of a vector view of a non-modifiable sequence of floating-point values.
| Method Summary | |
|---|---|
MathVector |
copy()
Creates a read-write vector referencing a copy of the data behind this vector. |
double |
correlation(ReadOnlyMathVector v)
Returns the linear correlation coefficient (Pearson correlation) between this vector and v. |
double |
dot(ReadOnlyMathVector v)
Returns the dot product of this vector with v. |
double |
dotNorm(ReadOnlyMathVector v)
Returns the dot product of the normalized versions of this vector and v (neither vector is modified). |
boolean |
equals(ReadOnlyMathVector v,
double tolerance)
Returns true if every element of this vector is within 'tolerance' of the corresponding element in v; i.e. |
double |
get(int index)
Returns the double value at the specified index. |
double[] |
getNewDataArray()
Returns an array containing a copy of the data behind this vector. |
double |
getQuick(int index)
Unchecked access to the double value at the specified index. |
double |
mag()
Returns the normal euclidean magnitude of this vector, i.e. |
double |
magSquared()
returns the square of the euclidean magnitude of this vector, i.e. |
double |
mean()
Returns the average of the entries of this vector. |
ReadOnlyMathVector |
readOnlyCopy()
Creates a read-only vector referencing a copy of the data behind this vector. |
int |
size()
Returns the number of elements in this vector. |
java.lang.String |
toString()
Returns a String representation of this vector. |
static int |
verifySizeMatch(ReadOnlyMathVector v1,
ReadOnlyMathVector v2)
Helper method to check size matching when combining two vectors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public MathVector copy()
public ReadOnlyMathVector readOnlyCopy()
public double[] getNewDataArray()
public int size()
size in interface ReadOnlyVectorDataProvider
public static int verifySizeMatch(ReadOnlyMathVector v1,
ReadOnlyMathVector v2)
throws java.lang.IndexOutOfBoundsException
v1 - the first vectorv2 - the second vector
java.lang.IndexOutOfBoundsException - if v1 and v2 have different sizes
public double get(int index)
throws java.lang.IndexOutOfBoundsException
index - the index of the element to return
java.lang.IndexOutOfBoundsException - unless index is valid, i.e. 0 <= index < size()public double getQuick(int index)
getQuick in interface ReadOnlyVectorDataProviderindex - the index of the element to return
public boolean equals(ReadOnlyMathVector v,
double tolerance)
throws java.lang.IndexOutOfBoundsException
v - the vector to compare totolerance - the desired measure of equality
java.lang.IndexOutOfBoundsException - if v is not the same size as this vectorpublic double mag()
public double magSquared()
public double mean()
public double dot(ReadOnlyMathVector v)
throws java.lang.IndexOutOfBoundsException
v - the other vector
java.lang.IndexOutOfBoundsException - if v is not the same size as this vector
public double dotNorm(ReadOnlyMathVector v)
throws java.lang.IndexOutOfBoundsException
v - the other vector
java.lang.IndexOutOfBoundsException - if v is not the same size as this vector
public double correlation(ReadOnlyMathVector v)
throws java.lang.IndexOutOfBoundsException
v - the other vector
java.lang.IndexOutOfBoundsException - if v is not the same size as this vectorpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||