public interface IloLQNumExpr extends IloQuadNumExpr, IloLinearNumExpr
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(IloLinearNumExpr lexpr)
Adds all terms found in
lexpr to the invoking object. |
void |
add(IloQuadNumExpr qexpr)
Adds all terms found in
qexpr to the invoking object. |
void |
addTerm(double coef,
IloNumVar var)
Adds the new term
coef * var to
the invoking linear quadratic expression. |
void |
addTerm(double coef,
IloNumVar var1,
IloNumVar var2)
Adds the new term
coef * var1 * var2 to
the invoking linear quadratic expression. |
void |
addTerm(IloNumVar var,
double coef)
Adds the new term
coef * var to
the invoking linear quadratic expression. |
void |
addTerms(double[] coef,
IloNumVar[] var)
Adds the terms
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression. |
void |
addTerms(double[] coef,
IloNumVar[] var1,
IloNumVar[] var2)
Adds the terms
sum_i (coef[i] * var1[i] * var2[i])
to the invoking linear quadratic expression. |
void |
addTerms(double[] coef,
IloNumVar[] var1,
IloNumVar[] 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(double[] coef,
IloNumVar[] 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 |
addTerms(IloNumVar[] var,
double[] coef)
Adds the terms
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression. |
void |
addTerms(IloNumVar[] var,
double[] 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 |
clear()
Removes all terms from the invoking object.
|
void |
remove(IloNumVar var)
Removes all terms that use
var from
the invoking expression. |
void |
remove(IloNumVar[] var)
Removes all terms that use a variable of the specified array
from the invoking expression.
|
void |
remove(IloNumVar[] 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(IloLinearNumExpr lexpr) throws IloException
lexpr to the invoking object.add in interface IloLinearNumExprIloExceptionlexpr - The scalar product expression, the terms of which are added
to the invoking object.void addTerm(double coef,
IloNumVar var)
throws IloException
coef * var to
the invoking linear quadratic expression.addTerm in interface IloLinearNumExprIloExceptioncoef - The coefficient of the added term.var - The variable of the added term.void addTerm(IloNumVar var, double coef) throws IloException
coef * var to
the invoking linear quadratic expression.addTerm in interface IloLinearNumExprIloExceptionvar - The variable of the added term.coef - The coefficient of the added term.void addTerms(double[] coef,
IloNumVar[] 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 IloLinearNumExprIloExceptioncoef - 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 addTerms(IloNumVar[] var, double[] 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 IloLinearNumExprIloExceptionvar - 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(double[] coef,
IloNumVar[] var)
throws IloException
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression.addTerms in interface IloLinearNumExprIloExceptioncoef - The coefficients of the added terms.var - The variables of the added terms.void addTerms(IloNumVar[] var, double[] coef) throws IloException
sum_i (coef[i] * var[i])
to the invoking linear quadratic expression.addTerms in interface IloLinearNumExprIloExceptionvar - The variables of the added terms.coef - The coefficients of the added terms.void add(IloQuadNumExpr qexpr) throws IloException
qexpr to the invoking object.add in interface IloQuadNumExprIloExceptionvoid addTerm(double coef,
IloNumVar var1,
IloNumVar var2)
throws IloException
coef * var1 * var2 to
the invoking linear quadratic expression.addTerm in interface IloQuadNumExprIloExceptionvoid addTerms(double[] coef,
IloNumVar[] var1,
IloNumVar[] var2)
throws IloException
sum_i (coef[i] * var1[i] * var2[i])
to the invoking linear quadratic expression.addTerms in interface IloQuadNumExprIloExceptionvoid addTerms(double[] coef,
IloNumVar[] var1,
IloNumVar[] 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 IloQuadNumExprIloExceptionvoid clear()
throws IloException
clear in interface IloLinearNumExprclear in interface IloQuadNumExprIloExceptionvoid remove(IloNumVar var) throws IloException
var from
the invoking expression.remove in interface IloLinearNumExprremove in interface IloQuadNumExprIloExceptionvar - The variable to be removed.void remove(IloNumVar[] var) throws IloException
remove in interface IloLinearNumExprremove in interface IloQuadNumExprIloExceptionvar - The array of variables to be removed.void remove(IloNumVar[] 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 IloLinearNumExprremove in interface IloQuadNumExprIloExceptionvar - 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.