agg.util.csp
Class Solution_Backjump

java.lang.Object
  extended by agg.util.csp.Solution_Backjump
All Implemented Interfaces:
SolutionStrategy
Direct Known Subclasses:
Solution_InjBackjump

public class Solution_Backjump
extends java.lang.Object
implements SolutionStrategy

A CSP solution strategy using the backjumping technique.


Constructor Summary
Solution_Backjump()
           
Solution_Backjump(boolean injective)
           
 
Method Summary
 void clear()
           
 java.util.Dictionary<java.lang.Object,Variable> getInstanceVarMap()
           
 boolean hasFoundSolution()
           
 boolean hasMoreSolutions()
           
 boolean hasQueries()
           
 boolean next(CSP csp)
          Find the next solution of csp, and instantiate its variables accordingly.
 boolean reinitialize(boolean doUpdateQueries)
           
 void reinitialize(Variable var)
           
 void reset()
          Reset my internal state, so that the forthcoming invocation of next() returns the first solution of the given CSP.
 void setRelatedInstanceVarMap(java.util.Dictionary<java.lang.Object,Variable> relatedVarIndexMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Solution_Backjump

public Solution_Backjump()

Solution_Backjump

public Solution_Backjump(boolean injective)
Method Detail

setRelatedInstanceVarMap

public void setRelatedInstanceVarMap(java.util.Dictionary<java.lang.Object,Variable> relatedVarIndexMap)
Specified by:
setRelatedInstanceVarMap in interface SolutionStrategy

getInstanceVarMap

public java.util.Dictionary<java.lang.Object,Variable> getInstanceVarMap()
Specified by:
getInstanceVarMap in interface SolutionStrategy

clear

public void clear()
Specified by:
clear in interface SolutionStrategy

reinitialize

public final boolean reinitialize(boolean doUpdateQueries)
Specified by:
reinitialize in interface SolutionStrategy

reinitialize

public void reinitialize(Variable var)
Specified by:
reinitialize in interface SolutionStrategy

reset

public final void reset()
Description copied from interface: SolutionStrategy
Reset my internal state, so that the forthcoming invocation of next() returns the first solution of the given CSP.

Specified by:
reset in interface SolutionStrategy

next

public final boolean next(CSP csp)
Description copied from interface: SolutionStrategy
Find the next solution of csp, and instantiate its variables accordingly. Variables already instantiated will not be altered, so this method can be used to complete partial solutions. Invoke this method successively with the same argument to get all solutions (or all completions of a given partial solution).

Specified by:
next in interface SolutionStrategy
Parameters:
csp - The CSP to solve.
Returns:
false if there are no more solutions.

hasMoreSolutions

public boolean hasMoreSolutions()
Specified by:
hasMoreSolutions in interface SolutionStrategy

hasFoundSolution

public boolean hasFoundSolution()
Specified by:
hasFoundSolution in interface SolutionStrategy

hasQueries

public boolean hasQueries()
Specified by:
hasQueries in interface SolutionStrategy