|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mines.jtk.opt.ScalarVect
public class ScalarVect
Implements a Vect by wrapping a single double
| Field Summary | |
|---|---|
protected double |
_value
wrapped data |
protected double |
_variance
variance for value |
| Constructor Summary | |
|---|---|
protected |
ScalarVect()
To be used with init() |
|
ScalarVect(double value,
double variance)
Specify the initial value |
| Method Summary | |
|---|---|
void |
add(double scaleThis,
double scaleOther,
VectConst other)
Add a scaled version of another vector to a scaled version of this vector. |
ScalarVect |
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). |
double |
get()
Get the value of the scalar. |
void |
init(double value,
double variance)
Initialize the 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. |
void |
set(double value)
Set the value of the scalar. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient double _value
protected transient double _variance
| Constructor Detail |
|---|
public ScalarVect(double value,
double variance)
value - The initial value of the wrapped scalarvariance - The method multiplyInverseCovariance()
will divide the scalar by this number.
Pass a value of 1 if you do not care.protected ScalarVect()
| Method Detail |
|---|
public final void init(double value,
double variance)
value - The initial value of the wrapped scalar .variance - The method multiplyInverseCovariance()
will divide the scalar by this number.
Pass a value of 1 if you do not care.public double get()
public void set(double value)
value - The new value of the wrapped scalar.public ScalarVect clone()
clone in interface Vectclone in interface VectConstclone in class java.lang.Objectpublic double dot(VectConst other)
VectConst
dot in interface VectConstother - The vector to be dotted.
public java.lang.String toString()
toString in class java.lang.Objectpublic void dispose()
Vect
dispose in interface Vectpublic void multiplyInverseCovariance()
Vect
multiplyInverseCovariance in interface Vectpublic void constrain()
Vect
constrain in interface Vectpublic void postCondition()
Vect
postCondition in interface Vect
public void add(double scaleThis,
double scaleOther,
VectConst other)
Vect
add in interface VectscaleThis - Multiply this vector by this scalar before adding.scaleOther - Multiply the other vector by this scalar before adding.other - The other vector to be multiplied.
public void project(double scaleThis,
double scaleOther,
VectConst other)
Vect
project in interface VectscaleThis - Multiply this vector by this scalar before adding.scaleOther - Multiply the other vector by this scalar before adding.other - The other vector to be projected, scaled, and added.public double magnitude()
VectConstVect vect = (Vect) this.clone(); vect.multiplyInverseCovariance(); return this.dot(vect);But you can usually avoid the clone.
magnitude in interface VectConst
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||