public class ArrayVect3f extends java.lang.Object implements Vect
Modifier and Type | Field and Description |
---|---|
protected float[][][] |
_data
wrapped data
|
protected double |
_variance
variance for all samples
|
Modifier | Constructor and Description |
---|---|
protected |
ArrayVect3f()
To be used with init()
|
|
ArrayVect3f(float[][][] data,
double variance)
Wrap an array as a Vect.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double scaleThis,
double scaleOther,
VectConst other)
Add a scaled version of another vector to a scaled version of this
vector.
|
ArrayVect3f |
clone() |
void |
constrain()
Optionally apply a hard constraint (such as an inequality)
to the current vector.
|
void |
dispose()
Optionally free any resources held by this object.
|
double |
dot(VectConst other)
Return the Cartesian dot product of this vector with another
vector (not including any inverse covariance).
|
float[][][] |
getData()
Get the embedded data.
|
int |
getSize()
Return the size of the embedded array
|
double |
getVariance()
Get the value of the variance passed to the constructor.
|
protected void |
init(float[][][] data,
double variance)
Wrap an array as a Vect.
|
double |
magnitude()
This is the dot product of the vector with
itself premultiplied by the inverse covariance.
|
void |
multiplyInverseCovariance()
Optionally multiply a vector by the inverse covariance matrix.
|
void |
postCondition()
Apply a linear filter that enhances components that should
be optimized first, and suppresses components of lesser importance.
|
void |
project(double scaleThis,
double scaleOther,
VectConst other)
Project another vector onto the space of this vector,
then scale, and add to a scaled version of this vector.
|
protected transient float[][][] _data
protected transient double _variance
public ArrayVect3f(float[][][] data, double variance)
data
- This will be assigned to the public data.variance
- This variance will be used to divide data in
multiplyInverseCovariance.protected ArrayVect3f()
public double getVariance()
protected final void init(float[][][] data, double variance)
data
- This will be assigned to the public data.variance
- This variance will be used to divide data in
multiplyInverseCovariance.public float[][][] getData()
public int getSize()
public void add(double scaleThis, double scaleOther, VectConst other)
Vect
public void project(double scaleThis, double scaleOther, VectConst other)
Vect
public void dispose()
Vect
public void multiplyInverseCovariance()
Vect
multiplyInverseCovariance
in interface Vect
public double magnitude()
VectConst
Vect vect = (Vect) this.clone(); vect.multiplyInverseCovariance(); return this.dot(vect);But you can usually avoid the clone.
public void constrain()
Vect
public void postCondition()
Vect
postCondition
in interface Vect
public ArrayVect3f clone()
public double dot(VectConst other)
VectConst