|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.akutan.optimization.entropy.EntropyInteriorPointsSolver
public class EntropyInteriorPointsSolver
| Field Summary | |
|---|---|
protected java.text.DecimalFormat |
df
|
| Constructor Summary | |
|---|---|
EntropyInteriorPointsSolver(cern.colt.matrix.DoubleMatrix1D e_r,
cern.colt.matrix.DoubleMatrix2D V,
double f)
|
|
| Method Summary | |
|---|---|
protected void |
addPoint(java.util.List<SolvedPoint> l,
cern.colt.matrix.DoubleMatrix1D x)
Helper function called to build the finished point object and add it to the mean variance frontier. |
protected double |
algorithm(int maxMin,
EVector w_p,
EMatrix Q,
EMatrix QC,
EConsVector cons,
double mu,
cern.colt.matrix.DoubleMatrix2D AV,
cern.colt.matrix.DoubleMatrix1D d,
double threshold)
Performs the actual algorithmic calculations of a single iteration. |
protected double |
computeAlpha(double mu,
EVector w_p,
cern.colt.matrix.DoubleMatrix2D AV,
cern.colt.matrix.DoubleMatrix1D d,
EVector X)
Computes the step size in the step direction X by finding the maximum step size that won't violate any constraints. |
protected java.lang.String |
formatOutput(int n,
cern.colt.matrix.linalg.Algebra alg,
EVector w_p,
int ct)
Called to write out a line into the standard output for this iteration of the solver |
protected cern.colt.matrix.DoubleMatrix1D |
generate_b(java.util.List<Constraint> constraints)
Given the list of constraints, builds the matrix of equality constraints rhs. |
protected cern.colt.matrix.DoubleMatrix1D |
generate_d(java.util.List<Constraint> constraints)
Given the list of constraints, builds the matrix of inequality constraints rhs. |
protected cern.colt.matrix.DoubleMatrix2D |
getEqualityConstraints(java.util.List<Constraint> constraints)
Given the list of constraints, builds the matrix of equality constraints A. |
protected cern.colt.matrix.DoubleMatrix2D |
getInequalityConstraints(java.util.List<Constraint> constraints)
Given the list of constraints, builds the matrix of inequality constraints C. |
protected EVector |
initialGuess(int maxMin,
double mu,
int m1,
cern.colt.matrix.DoubleMatrix2D AV,
cern.colt.matrix.DoubleMatrix1D d,
cern.colt.matrix.DoubleMatrix1D initX)
Called to compute the initial guess for a solution of the portfolio optimization problem |
protected java.lang.String |
prettyPrint(int n,
cern.colt.matrix.DoubleMatrix1D w_p,
int ct,
double eRet,
double eSigma,
double utility)
|
void |
savePath(boolean savePath)
Called to notify solver to save the path of solutions |
void |
setF(double f)
Set the variance constraint |
protected EVector |
solvePoint(int maxMin,
cern.colt.matrix.DoubleMatrix1D E_rx,
java.util.List<Constraint> constraints,
cern.colt.matrix.DoubleMatrix2D Vx,
double threshold,
cern.colt.matrix.DoubleMatrix1D initG)
Called to solve for a single point using the Interior Points method with logarithmic barriers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.text.DecimalFormat df
| Constructor Detail |
|---|
public EntropyInteriorPointsSolver(cern.colt.matrix.DoubleMatrix1D e_r,
cern.colt.matrix.DoubleMatrix2D V,
double f)
| Method Detail |
|---|
public void savePath(boolean savePath)
savePath - public void setF(double f)
f - protected cern.colt.matrix.DoubleMatrix2D getEqualityConstraints(java.util.List<Constraint> constraints)
constraints -
protected cern.colt.matrix.DoubleMatrix1D generate_b(java.util.List<Constraint> constraints)
constraints -
protected cern.colt.matrix.DoubleMatrix2D getInequalityConstraints(java.util.List<Constraint> constraints)
constraints -
protected cern.colt.matrix.DoubleMatrix1D generate_d(java.util.List<Constraint> constraints)
constraints -
protected EVector solvePoint(int maxMin,
cern.colt.matrix.DoubleMatrix1D E_rx,
java.util.List<Constraint> constraints,
cern.colt.matrix.DoubleMatrix2D Vx,
double threshold,
cern.colt.matrix.DoubleMatrix1D initG)
maxMin - Indicates maximizing or minimizingE_rx - constraints - Vx - threshold - initG -
protected double algorithm(int maxMin,
EVector w_p,
EMatrix Q,
EMatrix QC,
EConsVector cons,
double mu,
cern.colt.matrix.DoubleMatrix2D AV,
cern.colt.matrix.DoubleMatrix1D d,
double threshold)
maxMin - Indicates whether to maximize or minimize the objectivew_p - Vector with the state of the current pointQ - Matrix for multiplying the step from the current pointQC - Matrix for multiplying the current pointcons - Constant vector for rhs/constraintsmu - Step sizeAV - Matrix for inequality constraintsd - threshold - If x*x < threshold then stop the solver
protected void addPoint(java.util.List<SolvedPoint> l,
cern.colt.matrix.DoubleMatrix1D x)
l - x - Solution vector
protected EVector initialGuess(int maxMin,
double mu,
int m1,
cern.colt.matrix.DoubleMatrix2D AV,
cern.colt.matrix.DoubleMatrix1D d,
cern.colt.matrix.DoubleMatrix1D initX)
maxMin - Indicats whether to maximize or minimize the objectivemu - m1 - AV - d - initX -
protected double computeAlpha(double mu,
EVector w_p,
cern.colt.matrix.DoubleMatrix2D AV,
cern.colt.matrix.DoubleMatrix1D d,
EVector X)
mu - w_p - AV - d - X -
protected java.lang.String prettyPrint(int n,
cern.colt.matrix.DoubleMatrix1D w_p,
int ct,
double eRet,
double eSigma,
double utility)
protected java.lang.String formatOutput(int n,
cern.colt.matrix.linalg.Algebra alg,
EVector w_p,
int ct)
n - alg - w_p - ct -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||