public class AbstractCriterion.ValueContext extends Object implements AssignmentContext
| Modifier and Type | Field and Description |
|---|---|
protected double |
iTotal |
| Modifier | Constructor and Description |
|---|---|
protected |
ValueContext() |
protected |
ValueContext(Assignment<V,T> assignment)
Create from an assignment
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assigned(Assignment<V,T> assignment,
T value)
Update value when assigned
|
protected double[] |
getBounds(Assignment<V,T> assignment)
Return bounds
|
double |
getTotal()
Return value
|
void |
inc(double value)
Increment value
|
protected void |
setBounds(double[] bounds)
Set bounds
|
void |
setTotal(double value)
Set value
|
protected void |
unassigned(Assignment<V,T> assignment,
T value)
Update value when unassigned
|
protected double iTotal
protected ValueContext(Assignment<V,T> assignment)
assignment - current assignmentprotected ValueContext()
protected void unassigned(Assignment<V,T> assignment, T value)
assignment - current assignmentvalue - recently unassigned valueprotected void assigned(Assignment<V,T> assignment, T value)
assignment - current assignmentvalue - recently assigned valuepublic double getTotal()
public void setTotal(double value)
value - current value of the criterionpublic void inc(double value)
value - incrementprotected double[] getBounds(Assignment<V,T> assignment)
assignment - current assignmentprotected void setBounds(double[] bounds)
bounds - bounds to cache