public class CLPExpression
extends java.lang.Object
CLPConstraint
. Use CLP.createExpression()
to create a new instance.Modifier and Type | Method and Description |
---|---|
CLPExpression |
add(CLPVariable... variable)
Add the sum of multiple variables.
|
CLPExpression |
add(CLPVariable variable,
double value)
Add a new term to the expression.
|
CLPExpression |
add(double value)
Add a constant term to the expression.
|
CLPExpression |
add(double[] values,
CLPVariable[] variables)
Add the sum of multiple terms.
|
CLPExpression |
add(double value,
CLPVariable... variable)
Add the sum of multiple variables, each multiplied by the same scalar.
|
CLPExpression |
add(double value,
CLPVariable variable)
Add a new term to the expression.
|
CLPExpression |
add(java.util.Map<CLPVariable,java.lang.Double> variables)
Add the sum of multiple terms.
|
CLPObjective |
asObjective()
Set this expression as objective function of the
CLP model. |
CLPConstraint |
eq(double value)
Add this expression as equality constraint to the
CLP model. |
CLPConstraint |
geq(double value)
Add this expression as greater-or-equal constraint to the
CLP model. |
CLPConstraint |
leq(double value)
Add this expression as less-or-equal constraint to the
CLP model. |
CLPConstraint |
neq(double value)
Add this expression as not-equal constraint to the
CLP model. |
java.lang.String |
toString() |
public CLPExpression add(double value)
value
- public CLPExpression add(double value, CLPVariable variable)
value
- variable
- public CLPExpression add(CLPVariable variable, double value)
value
- variable
- public CLPExpression add(CLPVariable... variable)
value
- variable
- public CLPExpression add(double value, CLPVariable... variable)
value
- variable
- public CLPExpression add(double[] values, CLPVariable[] variables)
value
- variable
- public CLPExpression add(java.util.Map<CLPVariable,java.lang.Double> variables)
variables
- public CLPConstraint leq(double value)
CLP
model.value
- right-hand sideCLPConstraint
public CLPConstraint neq(double value)
CLP
model.value
- right-hand sideCLPConstraint
public CLPConstraint geq(double value)
CLP
model.value
- right-hand sideCLPConstraint
public CLPConstraint eq(double value)
CLP
model.value
- right-hand sideCLPConstraint
public CLPObjective asObjective()
CLP
model.CLPObjective
public java.lang.String toString()
toString
in class java.lang.Object