|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.akutan.optimization.Constraint
public class Constraint
Base class for linear optimization constraints
| Nested Class Summary | |
|---|---|
static class |
Constraint.Type
|
| Constructor Summary | |
|---|---|
Constraint(cern.colt.matrix.DoubleMatrix1D coefficients,
double rhs,
Constraint.Type type)
Constructs a generalized constraint |
|
| Method Summary | |
|---|---|
double |
get(int i)
Return the coefficient from the constraint for asset (i) |
cern.colt.matrix.DoubleMatrix1D |
getCoefficients()
Return the vector of coefficients from the constraint |
double |
getRhs()
Returns the constant |
Constraint.Type |
getType()
Returns the type of constraint |
static Constraint.Type |
getTypeFromString(java.lang.String s)
Converts a String into a constraint type |
static java.lang.String |
getTypeString(Constraint.Type type)
Returns the type of constraint as a String |
java.lang.String |
getVarId(int i)
Builds up a string of characters to identify the variable |
static cern.colt.matrix.DoubleMatrix1D |
makeCoefficients(int n)
Builds a coefficient matrix with increasing values equal to the cell index in each cell |
java.lang.String |
toString()
Return the Constraint formatted as a String for debugging |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Constraint(cern.colt.matrix.DoubleMatrix1D coefficients,
double rhs,
Constraint.Type type)
coefficients - rhs - type - | Method Detail |
|---|
public static cern.colt.matrix.DoubleMatrix1D makeCoefficients(int n)
n -
public double getRhs()
public Constraint.Type getType()
public static java.lang.String getTypeString(Constraint.Type type)
type - Type of constraint as an enum
public static Constraint.Type getTypeFromString(java.lang.String s)
s - Input String which is turned into a conatraint type
public cern.colt.matrix.DoubleMatrix1D getCoefficients()
public double get(int i)
i - Index which identifies which asset is selected.
public java.lang.String getVarId(int i)
i - Index of variable
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 | ||||||||