public interface IloQuadNumExpr extends IloNumExpr
A quadratic expression represents a sum of quadratic terms of the form
qexp = sum q_ij * x_i * x_j.
| Modifier and Type | Method and Description |
|---|---|
void |
add(IloQuadNumExpr qexpr)
Adds all terms found in
qexpr to the invoking object. |
void |
addTerm(double coef,
IloNumVar var1,
IloNumVar var2)
Adds the new term
coef * var1 * var2 to
the invoking quadratic expression. |
void |
addTerms(double[] coef,
IloNumVar[] var1,
IloNumVar[] var2)
Adds the terms
sum_i (coef[i] * var1[i] * var2[i])
to the invoking 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 quadratic expression, for the indices
i from start to start + num-1. |
void |
clear()
Removes all quadratic terms from the invoking object.
|
IloQuadNumExprIterator |
quadIterator()
Returns an iterator over the quadratic terms in the invoking quadratic
expression.
|
void |
remove(IloNumVar var)
Removes all terms that use
var from
the invoking quadratic expression. |
void |
remove(IloNumVar[] var)
Removes all terms that use a variable in the specified array
from the invoking quadratic expression.
|
void |
remove(IloNumVar[] var,
int start,
int num)
Removes all terms that use a variable
var[i]
from the invoking quadratic expression, for the indices i
from start to start + num-1. |
void add(IloQuadNumExpr qexpr) throws IloException
Adds all terms found in qexpr to the invoking object.
IloExceptionvoid addTerm(double coef,
IloNumVar var1,
IloNumVar var2)
throws IloException
Adds the new term coef * var1 * var2 to
the invoking quadratic expression.
IloExceptionvoid addTerms(double[] coef,
IloNumVar[] var1,
IloNumVar[] var2)
throws IloException
sum_i (coef[i] * var1[i] * var2[i])
to the invoking quadratic expression.IloExceptionvoid addTerms(double[] coef,
IloNumVar[] var1,
IloNumVar[] var2,
int start,
int num)
throws IloException
sum_i (coef[i] * var1[i] * var2[i])
to the invoking quadratic expression, for the indices
i from start to start + num-1.IloExceptionvoid clear()
throws IloException
IloExceptionIloQuadNumExprIterator quadIterator() throws IloException
IloExceptionvoid remove(IloNumVar var) throws IloException
var from
the invoking quadratic expression.IloExceptionvoid remove(IloNumVar[] var) throws IloException
IloExceptionvoid remove(IloNumVar[] var, int start, int num) throws IloException
var[i]
from the invoking quadratic expression, for the indices i
from start to start + num-1.IloException