agg.xt_basis
Class ALR_InheritCSP

java.lang.Object
  extended by agg.util.csp.CSP
      extended by agg.xt_basis.ALR_InheritCSP

public class ALR_InheritCSP
extends CSP

A CSP whose solutions represent morphisms between two graphs. Please note: This class is only for internal use of the critical pair analysis for grammars with node type inheritance. Do not use it for any kind of implementations.

See Also:
CSP

Field Summary
 
Fields inherited from class agg.util.csp.CSP
itsDomain, itsSolver, itsTouchedFlag
 
Constructor Summary
ALR_InheritCSP(Graph vargraph, AttrContext ac)
          Construct myself to be a CSP where every GraphObject of vargraph corresponds to exactly one of my variables.
 
Method Summary
 void enableAllVariables()
           
protected  void fillTypeMap(Graph domaingraph)
           
 AttrContext getAttrContext()
           
 java.util.Dictionary<java.lang.Object,Variable> getInstanceVarMap()
           
 int getSize()
          Return the number of variables in the CSP.
 Variable getVariable(GraphObject obj)
           
 java.util.Enumeration<Variable> getVariables()
          Return an Enumeration of all my variables.
 boolean isDomainOfTypeEmpty(Type t)
           
 boolean isDomainOfTypeEmpty(Type t, Type src, Type tar)
           
protected  void preprocessDomain(java.lang.Object domaingraph)
          Preprocess the given domain for optimization purposes (to get more accurate data for Constraint weights, or to initialize Query databases).
protected  void reinitializeSolver(boolean doUpdateQueries)
           
protected  void resetSolver(boolean doUpdateQueries)
           
protected  void resetSolverVariables()
           
protected  void resetTypeMap(Graph g)
           
protected  void resetTypeMap(java.util.Hashtable<java.lang.String,java.util.Vector<GraphObject>> aTypeMap)
           
protected  void resetVariableDomain()
           
protected  void resetVariableDomain(boolean instanceToNull)
           
protected  void resetVariableDomain(GraphObject go)
           
 void setRelatedInstanceVarMap(java.util.Dictionary<java.lang.Object,Variable> relatedVarMap)
           
protected  void unsetAttrContextVariable()
           
protected  void unsetAttrContextVariable(GraphObject go)
           
 
Methods inherited from class agg.util.csp.CSP
getDomain, hasFoundSolution, hasMoreSolutions, hasQueries, nextSolution, reinitialize, reset, setDomain, setSolutionStrategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ALR_InheritCSP

public ALR_InheritCSP(Graph vargraph,
                      AttrContext ac)
Construct myself to be a CSP where every GraphObject of vargraph corresponds to exactly one of my variables.

Pre: vargraph.isGraph().

Post: getDomain() == null.

Parameters:
vargraph - The ALR graph whose elements represent the variables of the CSP.
ac - The attribute context to map attributes in.
Method Detail

preprocessDomain

protected final void preprocessDomain(java.lang.Object domaingraph)
Description copied from class: CSP
Preprocess the given domain for optimization purposes (to get more accurate data for Constraint weights, or to initialize Query databases). This is a template method to be implemented in subclasses, and is invoked out of setDomain().

Specified by:
preprocessDomain in class CSP
See Also:
CSP.setDomain(java.lang.Object)

getAttrContext

public AttrContext getAttrContext()

getVariables

public final java.util.Enumeration<Variable> getVariables()
Description copied from class: CSP
Return an Enumeration of all my variables. Enumeration elements are of type Variable.

Specified by:
getVariables in class CSP

enableAllVariables

public void enableAllVariables()

isDomainOfTypeEmpty

public boolean isDomainOfTypeEmpty(Type t)

isDomainOfTypeEmpty

public boolean isDomainOfTypeEmpty(Type t,
                                   Type src,
                                   Type tar)

setRelatedInstanceVarMap

public void setRelatedInstanceVarMap(java.util.Dictionary<java.lang.Object,Variable> relatedVarMap)

getInstanceVarMap

public java.util.Dictionary<java.lang.Object,Variable> getInstanceVarMap()

getSize

public final int getSize()
Description copied from class: CSP
Return the number of variables in the CSP.

Specified by:
getSize in class CSP

getVariable

public final Variable getVariable(GraphObject obj)
Specified by:
getVariable in class CSP

fillTypeMap

protected void fillTypeMap(Graph domaingraph)

resetTypeMap

protected void resetTypeMap(Graph g)

resetTypeMap

protected void resetTypeMap(java.util.Hashtable<java.lang.String,java.util.Vector<GraphObject>> aTypeMap)

reinitializeSolver

protected void reinitializeSolver(boolean doUpdateQueries)

resetSolver

protected void resetSolver(boolean doUpdateQueries)

resetSolverVariables

protected void resetSolverVariables()

resetVariableDomain

protected void resetVariableDomain()

resetVariableDomain

protected void resetVariableDomain(boolean instanceToNull)

resetVariableDomain

protected void resetVariableDomain(GraphObject go)

unsetAttrContextVariable

protected void unsetAttrContextVariable()

unsetAttrContextVariable

protected void unsetAttrContextVariable(GraphObject go)