|
Cream version 1.06 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.ac.kobe_u.cs.cream.Trail
public class Trail
Trail class implements trail stacks.
DefaultSolver
Constructor Summary | |
---|---|
Trail()
|
Method Summary | |
---|---|
void |
push(Variable v)
Pushes a pair of the variable v and its domain to the trail stack. |
int |
size()
Returns the size of the trail stack. |
void |
undo(int size0)
Undoes the previous assignments by popping the variable-domain pair from the trail until the size becomes size0. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Trail()
Method Detail |
---|
public int size()
public void push(Variable v)
Variable.updateDomain(Domain, Trail)
.
v
- the variablepublic void undo(int size0) throws EmptyStackException
size0
- the size to be after undoing
EmptyStackException
|
Cream version 1.06 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |