org.akutan.optimization.diversified
Class DMatrix

java.lang.Object
  extended by org.akutan.optimization.diversified.DMatrix

public class DMatrix
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 CONSTANT
           
static int MAXIMIZE
           
static int MINIMIZE
           
static int VARIABLE
           
 
Constructor Summary
DMatrix(int vOrC, int type, int uw, int vw, int xw)
          Constructs
 
Method Summary
 cern.colt.matrix.DoubleMatrix2D get()
          Simple accessor to get the underlying matrix.
 void setQ(cern.colt.matrix.DoubleMatrix2D Q, DVector v)
          Called to set all variance values in the matrix from the covariance and the mean vector.
 void setU(cern.colt.matrix.DoubleMatrix2D U)
          Called to set the equality constraints -U' goes in dx row, y0 column U goes in dy0 row, x column
 void setV(cern.colt.matrix.DoubleMatrix2D V)
          Called to set the coefficients of rht inequality constraints -V' goes in dx row, y1 column V goes in dy1 row, x column
 void setW1(DVector v)
          Called to set the w1 vector w(hat) goes in y1w1 row, y1 column
 void setW2(DVector v)
          Called to set the w2 vector w(hat) goes in y2w2 row, y2 column
 void setX(DVector v)
          Called to set the x vector xt goes into dx row, y2 column x(hat) goes in xzrow, z column x goes into dy2row, x column
 void setY1(DVector v)
          Called to set the y1 vector y1(hat) goes in y1w1 row, w1 column
 void setY2(DVector v)
          Called to set the y2 vector y1(hat) goes in y2w2 row, w2 column
 void setZ(DVector v)
          Called to set the z vector z(hat) goes in xzrow, x column
 java.lang.String toString()
          Overrides Object method to format as a String, just delegates to the Matrix inside.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VARIABLE

public static final int VARIABLE
See Also:
Constant Field Values

CONSTANT

public static final int CONSTANT
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

DMatrix

public DMatrix(int vOrC,
               int type,
               int uw,
               int vw,
               int xw)
Constructs

Parameters:
vOrC - Variable or Constant side of the equation
type - Type of matrix
uw - Width of equality constraints
vw - Width of inequality constraints
xw - Width of x vector
Method Detail

setQ

public void setQ(cern.colt.matrix.DoubleMatrix2D Q,
                 DVector v)
Called to set all variance values in the matrix from the covariance and the mean vector.

Parameters:
Q -
v -

setU

public void setU(cern.colt.matrix.DoubleMatrix2D U)
Called to set the equality constraints -U' goes in dx row, y0 column U goes in dy0 row, x column

Parameters:
U -

setV

public void setV(cern.colt.matrix.DoubleMatrix2D V)
Called to set the coefficients of rht inequality constraints -V' goes in dx row, y1 column V goes in dy1 row, x column

Parameters:
V -

setW1

public void setW1(DVector v)
Called to set the w1 vector w(hat) goes in y1w1 row, y1 column

Parameters:
v - Vector of slack variables for inequality constraints

setW2

public void setW2(DVector v)
Called to set the w2 vector w(hat) goes in y2w2 row, y2 column

Parameters:
v - Vector of slack variables for inequality constraints

setY1

public void setY1(DVector v)
Called to set the y1 vector y1(hat) goes in y1w1 row, w1 column

Parameters:
v - Vector of slack variables for inequality constraints

setY2

public void setY2(DVector v)
Called to set the y2 vector y1(hat) goes in y2w2 row, w2 column

Parameters:
v - Vector of slack variables for inequality constraints

setX

public void setX(DVector v)
Called to set the x vector xt goes into dx row, y2 column x(hat) goes in xzrow, z column x goes into dy2row, x column

Parameters:
v - Vector of asset weights

setZ

public void setZ(DVector v)
Called to set the z vector z(hat) goes in xzrow, x column

Parameters:
v - Vector of slack variables for inequality constraints

get

public cern.colt.matrix.DoubleMatrix2D get()
Simple accessor to get the underlying matrix.

Returns:
The underlying matrix

toString

public java.lang.String toString()
Overrides Object method to format as a String, just delegates to the Matrix inside.

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