public interface IloLQIntExpr extends IloQuadIntExpr, IloLinearIntExpr
A quadratic expression represents a sum of quadratic terms and linear
terms of the form:
exp = sum a_i * x_i + sum q_ij * x_i * x_j + const
| Modifier and Type | Method and Description |
|---|---|
void |
add(IloLinearIntExpr lexpr)
Adds all terms found in the specified linear expression
to the invoking object.
|
void |
add(IloQuadIntExpr qexpr)
Adds all terms found in the specified quadratic expression
to the invoking object.
|
void |
addTerm(IloIntVar var,
int coef)
Adds the new term
coef * var
to the invoking linear quadratic expression. |
void |
addTerm(int coef,
IloIntVar var)
Adds the new term
coef * var
to the invoking linear quadratic expression. |
void |
addTerm(int coef,
IloIntVar var1,
IloIntVar var2)
Adds the new term
coef * var1 * var2
to the invoking linear quadratic expression. |
void |
addTerms(IloIntVar[] var,
int[] coef)
Adds the terms specified by
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression. |
void |
addTerms(IloIntVar[] var,
int[] coef,
int start,
int num)
Adds the terms specified by
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression, for the indices
i from start to start + num-1. |
void |
addTerms(int[] coef,
IloIntVar[] var)
Adds the terms specified by
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression. |
void |
addTerms(int[] coef,
IloIntVar[] var1,
IloIntVar[] var2)
Adds the terms specified by
sum_i (coef[i] * var1[i] * var2[i])
to the invoking linear quadratic expression. |
void |
addTerms(int[] coef,
IloIntVar[] var1,
IloIntVar[] var2,
int start,
int num)
Adds the terms specified by
sum_i (coef[i] * var1[i] * var2[i])
to the invoking linear quadratic expression, for the indices
i from start to start + num-1. |
void |
addTerms(int[] coef,
IloIntVar[] var,
int start,
int num)
Adds the terms specified by
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression, for the indices
i from start to start + num-1. |
void |
clear()
Removes all terms from the invoking object.
|
void |
remove(IloIntVar var)
Removes all terms that use
var from
the invoking expression. |
void |
remove(IloIntVar[] var)
Removes all terms that use a variable of the specified array
from the invoking expression.
|
void |
remove(IloIntVar[] var,
int start,
int num)
Removes all terms that use a variable
var[i]
from the invoking expression, for the indices i
from start to start + num-1. |
quadIteratorgetConstant, linearIterator, setConstantvoid add(IloLinearIntExpr lexpr) throws IloException
add in interface IloLinearIntExprIloExceptionlexpr - The scalar product expression, the terms of which are added
to the invoking object.void addTerm(IloIntVar var, int coef) throws IloException
coef * var
to the invoking linear quadratic expression.addTerm in interface IloLinearIntExprIloExceptionvar - The variable of the added term.coef - The coefficient of the added term.void addTerm(int coef,
IloIntVar var)
throws IloException
coef * var
to the invoking linear quadratic expression.addTerm in interface IloLinearIntExprIloExceptioncoef - The coefficient of the added term.var - The variable of the added term.void addTerms(IloIntVar[] var, int[] coef) throws IloException
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression.addTerms in interface IloLinearIntExprIloExceptionvar - The variables of added terms.coef - The coefficients of added terms.void addTerms(int[] coef,
IloIntVar[] var)
throws IloException
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression.addTerms in interface IloLinearIntExprIloExceptioncoef - The coefficients of added terms.var - The variables of added terms.void addTerms(IloIntVar[] var, int[] coef, int start, int num) throws IloException
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression, for the indices
i from start to start + num-1.addTerms in interface IloLinearIntExprIloExceptionvar - The variables of the added terms.coef - The coefficients of the added terms.start - The first element in coef, var to be added.num - The number of added terms.void addTerms(int[] coef,
IloIntVar[] var,
int start,
int num)
throws IloException
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression, for the indices
i from start to start + num-1.addTerms in interface IloLinearIntExprIloExceptioncoef - The coefficients of the added terms.var - The variables of the added terms.start - The first element in coef, var to be added.num - The number of added terms.void add(IloQuadIntExpr qexpr) throws IloException
add in interface IloQuadIntExprIloExceptionvoid addTerm(int coef,
IloIntVar var1,
IloIntVar var2)
throws IloException
coef * var1 * var2
to the invoking linear quadratic expression.addTerm in interface IloQuadIntExprIloExceptionvoid addTerms(int[] coef,
IloIntVar[] var1,
IloIntVar[] var2)
throws IloException
sum_i (coef[i] * var1[i] * var2[i])
to the invoking linear quadratic expression.addTerms in interface IloQuadIntExprIloExceptionvoid addTerms(int[] coef,
IloIntVar[] var1,
IloIntVar[] var2,
int start,
int num)
throws IloException
sum_i (coef[i] * var1[i] * var2[i])
to the invoking linear quadratic expression, for the indices
i from start to start + num-1.addTerms in interface IloQuadIntExprIloExceptionvoid clear()
throws IloException
clear in interface IloLinearIntExprclear in interface IloQuadIntExprIloExceptionvoid remove(IloIntVar var) throws IloException
var from
the invoking expression.remove in interface IloLinearIntExprremove in interface IloQuadIntExprIloExceptionvar - The variable to be removed.void remove(IloIntVar[] var) throws IloException
remove in interface IloLinearIntExprremove in interface IloQuadIntExprIloExceptionvar - The array of variables to be removed.void remove(IloIntVar[] var, int start, int num) throws IloException
var[i]
from the invoking expression, for the indices i
from start to start + num-1.remove in interface IloLinearIntExprremove in interface IloQuadIntExprIloExceptionvar - The array containing the variables to be removed.start - The index of the first variable in var to be removed.num - The number of variables in var to be removed.