|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LinearProgram
A generic inteface to a linear programming package. Constraints are all specified in terms of arrays of variables; it is up to the user to keep track of which index of the array corresponds to which variable. In functions taking an index, the indices start from 0.
Method Summary | |
---|---|
void |
addConstraintEQ(double[] constraint,
double rhs)
Adds an equality constraint between the variables with coefficients |
void |
addConstraintGE(double[] constraint,
double rhs)
Adds a greater-than-or-equal constraint between the variables with coefficients |
double[] |
getEmptyConstraint()
Returns an array with a zero-entry for each variable in the linear program (which the client can then fill in with coefficients before checking in as a new constraint.) |
void |
setBoolVar(int n)
Constrains the n'th variable of this to be an integer. |
void |
setObjective(double[] obj)
Sets the objective function to be |
Method Detail |
---|
double[] getEmptyConstraint()
void setObjective(double[] obj)
void setBoolVar(int n)
void addConstraintGE(double[] constraint, double rhs)
void addConstraintEQ(double[] constraint, double rhs)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |