|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.cpsolver.ifs.model.Variable
net.sf.cpsolver.ifs.multi.MultiVariable
public class MultiVariable
A variable containing multiple "normal" variables.
| Field Summary | |
|---|---|
static boolean |
sCacheValues
|
| Fields inherited from class net.sf.cpsolver.ifs.model.Variable |
|---|
iId, iValue |
| Constructor Summary | |
|---|---|
MultiVariable()
|
|
MultiVariable(Vector variables)
Constructor |
|
| Method Summary | |
|---|---|
void |
addVariable(Variable variable)
Add "normal" variable |
void |
assign(long iteration,
Value value)
Assign value to this variable. |
Vector |
computeValues()
Variable domain -- Cartesian product of the domains of the "normal" variables |
String |
getName()
Variable's name -- for printing purposes |
void |
removeVariable(Variable variable)
Remove "normal" variable |
int |
size()
Number of "normal" variables |
void |
unassign(long iteration)
Unassign value from this variable. |
void |
valueRemoved(long iteration,
Value value)
Called by the variable when a value is permanently removed from its domain |
Vector |
values()
Domain |
void |
variableAssigned(long iteration,
Value value)
Called by the variable when a value is assigned to it |
Vector |
variables()
List of "normal" variables |
void |
variableUnassigned(long iteration,
Value value)
Called by the variable when a value is unassigned from it |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean sCacheValues
| Constructor Detail |
|---|
public MultiVariable(Vector variables)
variables - list of "normal" variablespublic MultiVariable()
| Method Detail |
|---|
public void addVariable(Variable variable)
public void removeVariable(Variable variable)
public Vector variables()
public int size()
public Vector computeValues()
public Vector values()
Variable
values in class Variable
public void assign(long iteration,
Value value)
Variable
assign in class Variableiteration - current iterationvalue - the value to be assignedpublic void unassign(long iteration)
Variable
unassign in class Variableiteration - current iterationpublic String getName()
Variable
getName in class Variable
public void variableAssigned(long iteration,
Value value)
VariableListener
variableAssigned in interface VariableListeneriteration - current iterationvalue - assigned to the variable
public void variableUnassigned(long iteration,
Value value)
VariableListener
variableUnassigned in interface VariableListeneriteration - current iterationvalue - unassigned from the variable
public void valueRemoved(long iteration,
Value value)
VariableListener
valueRemoved in interface VariableListeneriteration - current iterationvalue - removed from the variable's domain
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||