ix.util.match
Class MatchChoiceManager

java.lang.Object
  extended by ix.util.match.MatchChoiceManager
Direct Known Subclasses:
VariableManager

public class MatchChoiceManager
extends java.lang.Object

Manages a pool of constraints on variable values. ... /\/

N.B. This is a simple-minded "proof of concept" version, lacking many obvious optimisations.

See Also:
MatchChoice

Field Summary
protected  ContextBoolean changedSinceRecalc
           
protected  LLQueue matchChoices
           
static boolean traceDetails
           
 
Constructor Summary
MatchChoiceManager()
           
 
Method Summary
 void add(MatchChoice mc)
           
 void clear()
           
 java.util.Map getPossibleValues()
          Returns a map: variable -> set of possible values, one entry for each variable known to this manager.
 java.util.Map getPossibleValues(java.util.Set vars)
          Returns a map: variable -> set of possible values, one entry for each variable in the specified set.
 java.util.Set getPossibleValues(Variable v)
           
 java.util.Set getVariables()
           
protected  MatchEnv noticeForcedBindings()
           
 void recalculate()
           
 void remove(MatchChoice mc)
           
 void reset()
           
 void showState()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

traceDetails

public static boolean traceDetails

matchChoices

protected LLQueue matchChoices

changedSinceRecalc

protected ContextBoolean changedSinceRecalc
Constructor Detail

MatchChoiceManager

public MatchChoiceManager()
Method Detail

reset

public void reset()

clear

public void clear()

add

public void add(MatchChoice mc)

remove

public void remove(MatchChoice mc)

getVariables

public java.util.Set getVariables()

getPossibleValues

public java.util.Map getPossibleValues()
Returns a map: variable -> set of possible values, one entry for each variable known to this manager.

See Also:
getVariables(), getPossibleValues(Set)

getPossibleValues

public java.util.Map getPossibleValues(java.util.Set vars)
Returns a map: variable -> set of possible values, one entry for each variable in the specified set.


getPossibleValues

public java.util.Set getPossibleValues(Variable v)

recalculate

public void recalculate()

noticeForcedBindings

protected MatchEnv noticeForcedBindings()

showState

public void showState()