|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the iterator for the linear terms of an IloLinearNumExpr
expression object. The iterator allows the caller to enumerate
all the terms of an IloLinearNumExpr
and perform simple
operations, such as querying or modifying a term. During the iteration,
the caller can remove elements from the underlying
IloLinearNumExpr
using well-defined semantics.
Method Summary | |
double |
getValue()
Returns the coefficient related to the IloNumVar accessed by the last
call to the method next() . |
IloNumVar |
nextNumVar()
Returns the IloNumVar of the next linear term in the
underlying IloLinearNumExpr . |
void |
setNumVar(IloNumVar var)
Sets the IloNumVar of the last linear term
in the scalar product. |
void |
setValue(double value)
Sets the coefficient related to the IloIntVar
accessed by the last call to the method next() . |
Methods inherited from interface java.util.Iterator |
hasNext, next, remove |
Method Detail |
public IloNumVar nextNumVar()
IloNumVar
of the next linear term in the
underlying IloLinearNumExpr
. This differs from the method
next()
in that this method returns the variable with the
correct java type, avoiding the need for a downcast.
IloNumVar
in the iteration.
NoSuchElementException
- The iteration has no more elements.public void setNumVar(IloNumVar var)
IloNumVar
of the last linear term
in the scalar product.
var
- The variable to be set for the current linear
term of the underlying IloLinearNumExpr
.
IllegalStateException
- This occurs if the next()
or the nextNumVar()
method has not been called, or if
the remove method has been called since the last call
to the next()
or the nextNumVar()
method.public double getValue()
IloNumVar
accessed by the last
call to the method next()
.
IllegalStateException
- This occurs if the
next()
or the nextNumVar()
method has
not been called, or if the remove method has been
called since the last call to the next()
or the
nextNumVar()
method.public void setValue(double value)
IloIntVar
accessed by the last call to the method next()
.
value
- The coefficient value to be set for the current linear
term of the underlying IloLinearNumExpr
.
IllegalStateException
- This occurs if the
method next
or nextNumVar
has not been called, or if
the remove method has been called since the last call
to next
or nextNumVar
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |