org.akutan.optimization
Class IPMatrix

java.lang.Object
  extended by org.akutan.optimization.IPMatrix

public class IPMatrix
extends java.lang.Object

This class encapsulates the assignment and structure of the various subcomponents of the interior point method solution.


Field Summary
static int LEFT
           
static int MAXIMIZE
           
static int MINIMIZE
           
static int RIGHT
           
 
Constructor Summary
IPMatrix(int lOrR, int type, int uw, int vw, int xw, int zw)
          Constructs
 
Method Summary
 cern.colt.matrix.DoubleMatrix2D get()
          Returns the underlying matrix
 void setQ(cern.colt.matrix.DoubleMatrix2D Q)
          Called to set all variance values in Row 1, Column 1
 void setU(cern.colt.matrix.DoubleMatrix2D U)
          Called to set the equality constraints U goes in Row 1, Column 3 -U' goes in Row 2, Column 1
 void setV(cern.colt.matrix.DoubleMatrix2D V)
          Called to set the coefficients of rht inequality constraints -V' goes in Row 1, Column 4 V goes in Row 3, Column 1
 void setw(IPVector w)
          Called to set the w vector w(hat) goes in Row 4, Column 4
 void setx(IPVector x)
          Called to set the x vector x(hat) goes in Row 5, Column 5
 void setY1(IPVector v)
          Called to set the y1 vector y1(hat) goes in Row 4, Column 2
 void setz(IPVector z)
          Called to set the z vector z(hat) goes in Row 5, Column 1
 java.lang.String toString()
          Formats the object as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

MAXIMIZE

public static final int MAXIMIZE
See Also:
Constant Field Values

MINIMIZE

public static final int MINIMIZE
See Also:
Constant Field Values
Constructor Detail

IPMatrix

public IPMatrix(int lOrR,
                int type,
                int uw,
                int vw,
                int xw,
                int zw)
Constructs

Parameters:
lOrR - Indicates if we're constructing a matrix which operates on X (right) or dX (left)
type - Are we maximizing or minimizing the objective function
uw - The number of equality constraints
vw - The number of inequality constraints
xw - The number of assets
zw - Should be the number of assets?
Method Detail

setQ

public void setQ(cern.colt.matrix.DoubleMatrix2D Q)
Called to set all variance values in Row 1, Column 1

Parameters:
Q - The Q matrix - covariance * delta

setU

public void setU(cern.colt.matrix.DoubleMatrix2D U)
Called to set the equality constraints U goes in Row 1, Column 3 -U' goes in Row 2, Column 1

Parameters:
U - The matrix of equality conatraint coefficients

setV

public void setV(cern.colt.matrix.DoubleMatrix2D V)
Called to set the coefficients of rht inequality constraints -V' goes in Row 1, Column 4 V goes in Row 3, Column 1

Parameters:
V - The matrix of inequality constraint coefficients

setw

public void setw(IPVector w)
Called to set the w vector w(hat) goes in Row 4, Column 4

Parameters:
w - Solution vector from which slack variables for inequality constraints will be drawn.

setY1

public void setY1(IPVector v)
Called to set the y1 vector y1(hat) goes in Row 4, Column 2

Parameters:
v - Solution vector from which lagrange multipliers for inequality constraints will be drawn.

setx

public void setx(IPVector x)
Called to set the x vector x(hat) goes in Row 5, Column 5

Parameters:
x - Solution vector from which the X vector will be drawn.

setz

public void setz(IPVector z)
Called to set the z vector z(hat) goes in Row 5, Column 1

Parameters:
z - Solution vector from which the Z vector will be drawn.

get

public cern.colt.matrix.DoubleMatrix2D get()
Returns the underlying matrix

Returns:
The underlying matrix

toString

public java.lang.String toString()
Formats the object as a string

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()