|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.akutan.optimization.IPVector
public class IPVector
This class encapsulates the assignment and structure of the various subcomponents of the interior point method solution. The Vector is broken out into w slack vector for inquality constraints x solution vector y lagrange multipliers for all constraints z dual variables for solution vector
| Field Summary | |
|---|---|
protected int |
_woffset
|
protected int |
_wwidth
|
protected int |
_xoffset
|
protected int |
_xwidth
|
protected int |
_y0offset
|
protected int |
_y0width
|
protected int |
_y1offset
|
protected int |
_y1width
|
protected int |
_zoffset
|
protected int |
_zwidth
|
| Constructor Summary | |
|---|---|
IPVector(int uw,
int vw,
int xw,
int zw)
Constructs |
|
IPVector(int uw,
int vw,
int xw,
int zw,
cern.colt.matrix.DoubleMatrix1D v)
Constructs |
|
| Method Summary | |
|---|---|
void |
add(IPVector v)
Called to add a vector to this one |
java.lang.Object |
clone()
Clones the object, makes a deep copy of the underlying vector |
cern.colt.matrix.DoubleMatrix1D |
get()
Called to get access to the contents expressed as a 1D vector |
cern.colt.matrix.DoubleMatrix1D |
getW()
Called to return the W vector |
cern.colt.matrix.DoubleMatrix1D |
getX()
Called to get access to the x vector |
cern.colt.matrix.DoubleMatrix1D |
getY0()
Called to return the y0 vector |
cern.colt.matrix.DoubleMatrix1D |
getY1()
Called to return the y1 vector |
cern.colt.matrix.DoubleMatrix1D |
getZ()
Called to return the Z vector |
IPVector |
multiply(double d)
Multiplies the solution vector by a constant. |
IPVector |
negate()
Called to negate an IPVector, copies the vector, negates the copy and then returns the negated copy. |
int |
rows()
Returns the size of the wrapper DoubleMatrix1D |
void |
setW(cern.colt.matrix.DoubleMatrix1D w)
Called to set the w vector |
void |
setX(double cons)
Called to set all x values equal to cons |
void |
setX(cern.colt.matrix.DoubleMatrix1D x)
Called to set all x values equal to cons |
void |
setY0(double cons)
Called to set all y0 values equal to cons |
void |
setY0(cern.colt.matrix.DoubleMatrix1D y0)
Called to set all y0 values from a vector |
void |
setY1(double cons)
Called to set all y1 values equal to cons |
void |
setY1(cern.colt.matrix.DoubleMatrix1D y1)
Called to set all uy1 values from a vector |
void |
setZ(double cons)
Called to set the z vector |
void |
setZ(cern.colt.matrix.DoubleMatrix1D z)
Called to set the z vector |
java.lang.String |
toString()
Formats the solution vector as a String |
double |
xDotProduct()
Computes the dot product of the X portion of the solution vector |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int _xwidth
protected int _wwidth
protected int _y0width
protected int _y1width
protected int _zwidth
protected final int _xoffset
protected int _woffset
protected final int _y0offset
protected int _y1offset
protected int _zoffset
| Constructor Detail |
|---|
public IPVector(int uw,
int vw,
int xw,
int zw)
uw - Number of equality constraintsvw - Number of inequality constraintsxw - Number of assets in the problemzw - Number of dual variables for the assets
public IPVector(int uw,
int vw,
int xw,
int zw,
cern.colt.matrix.DoubleMatrix1D v)
uw - Number of equality constraintsvw - Number of inequality constraintsxw - Number of assets in the problemzw - Number of dual variablesv - Vector to use for storage| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionCloneablepublic void setX(double cons)
cons - The constant to set into all x values.public void setX(cern.colt.matrix.DoubleMatrix1D x)
x - The vector to set into the x vectorpublic cern.colt.matrix.DoubleMatrix1D getX()
public void setY0(double cons)
cons - The constant to put into the Y0 portion of the solution vector.public void setY0(cern.colt.matrix.DoubleMatrix1D y0)
y0 - The vector to set into the Y0 portion of the solution vector.public cern.colt.matrix.DoubleMatrix1D getY0()
public void setY1(double cons)
cons - The constant to set into the y1 valuespublic void setY1(cern.colt.matrix.DoubleMatrix1D y1)
y1 - The vector to set into the y1 vectorpublic cern.colt.matrix.DoubleMatrix1D getY1()
public void setW(cern.colt.matrix.DoubleMatrix1D w)
w - Vector of slack variables for inequality constraintspublic cern.colt.matrix.DoubleMatrix1D getW()
public void setZ(double cons)
cons - The constant to set into the dual variables.public void setZ(cern.colt.matrix.DoubleMatrix1D z)
z - The vector to set over the vector of dual variables.public cern.colt.matrix.DoubleMatrix1D getZ()
public cern.colt.matrix.DoubleMatrix1D get()
public IPVector negate()
public IPVector multiply(double d)
d - Constant by which to multiply the solution vector
public int rows()
public void add(IPVector v)
v - An IPVector to be added elementwise to thispublic double xDotProduct()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||