|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.spi.arcalgorithm.ArcBasedAcAlg
Base class for arc-consistency algorithms. This includes an algorithm that is based on node-arc graph propagation.
Constructor Summary | |
ArcBasedAcAlg()
Constructor |
Method Summary | |
void |
addConstraint(jopt.csp.variable.CspConstraint constraint)
Adds a constraint to be managed by this algorithm |
void |
addVariable(jopt.csp.variable.CspVariable var)
Adds a variable that may not a part of a constraint that is posted to be managed by this algorithm |
void |
arcAddedEvent(NodeArcGraph graph,
Arc arc)
Called when an arc is added to the graph as a result of arcs being posted by constraints. |
void |
arcRemovedEvent(NodeArcGraph graph,
Arc arc)
Called when an arc is removed from the graph, generally because the choice point stack is being popped. |
java.lang.Object |
getProblemState()
Returns the current state of the problem. |
jopt.csp.variable.CspVariableFactory |
getVarFactory()
Returns the variable factory for this algorithm |
void |
nodeChangedEvent(NodeArcGraph graph,
NodeChangeEvent evt)
Called when a node in the graph has a domain change. |
void |
nodeRemovedEvent(NodeArcGraph graph,
Node n)
Called when a node is removed from the graph, generally because the choice point stack is being popped. |
void |
restoreProblemState(java.lang.Object state)
Restores the current state of the problem. |
void |
setChoicePointStack(ChoicePointStack cps)
Sets the choicepoint stack associated with this algorithm. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jopt.csp.variable.CspAlgorithm |
propagate |
Constructor Detail |
public ArcBasedAcAlg()
Method Detail |
public void addVariable(jopt.csp.variable.CspVariable var)
addVariable
in interface jopt.csp.variable.CspAlgorithm
public void addConstraint(jopt.csp.variable.CspConstraint constraint)
addConstraint
in interface jopt.csp.variable.CspAlgorithm
public void setChoicePointStack(ChoicePointStack cps)
setChoicePointStack
in interface ChoicePointAlgorithm
public jopt.csp.variable.CspVariableFactory getVarFactory()
getVarFactory
in interface jopt.csp.variable.CspAlgorithm
public java.lang.Object getProblemState()
getProblemState
in interface ChoicePointAlgorithm
public void restoreProblemState(java.lang.Object state)
restoreProblemState
in interface ChoicePointAlgorithm
public void arcAddedEvent(NodeArcGraph graph, Arc arc)
NodeArcGraphListener
arcAddedEvent
in interface NodeArcGraphListener
public void arcRemovedEvent(NodeArcGraph graph, Arc arc)
NodeArcGraphListener
arcRemovedEvent
in interface NodeArcGraphListener
public void nodeRemovedEvent(NodeArcGraph graph, Node n)
NodeArcGraphListener
nodeRemovedEvent
in interface NodeArcGraphListener
public void nodeChangedEvent(NodeArcGraph graph, NodeChangeEvent evt)
NodeArcGraphListener
nodeChangedEvent
in interface NodeArcGraphListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |