agg.xt_basis
Class MorphCompletionStrategy

java.lang.Object
  extended by agg.xt_basis.MorphCompletionStrategy
All Implemented Interfaces:
StrategyProperties, CompletionPropertyBits, java.lang.Cloneable
Direct Known Subclasses:
Completion_CSP, Completion_InheritCSP, Completion_NAC, Completion_SimpleBT

public class MorphCompletionStrategy
extends java.lang.Object
implements StrategyProperties, CompletionPropertyBits, java.lang.Cloneable


Field Summary
protected  java.lang.String itsName
           
protected  java.util.BitSet itsProperties
           
 
Fields inherited from interface agg.xt_basis.CompletionPropertyBits
BITNAME, DANGLING, IDENTIFICATION, INJECTIVE, NAC, PAC
 
Constructor Summary
  MorphCompletionStrategy()
           
protected MorphCompletionStrategy(java.util.BitSet supported_properties)
          Attach myself to given ALR morphism completion strategy.
 
Method Summary
 java.lang.Object clone()
          Return a clone of myself.
 void dispose()
           
 boolean equals(java.lang.Object other)
          Return true iff the given object is an instance of the same concrete strategy class as me and has the same property bits set.
 void forceBackState()
           
 AttrContext getAttrContext()
           
 java.util.Dictionary<java.lang.Object,Variable> getInstanceVarMap()
           
 java.lang.String getName()
           
 java.util.BitSet getProperties()
          Return information about what properties are currently activated.
 int getSize()
           
 java.util.BitSet getSupportedProperties()
          Return information about what properties I support.
 boolean hasRelatedInstanceVarMap()
           
protected  void initialize(java.util.BitSet supported_properties, java.util.BitSet active_properties)
           
 void initialize(OrdinaryMorphism morph)
           
 boolean isDomainOfTypeEmpty(Type t)
           
 boolean isDomainOfTypeEmpty(Type t, Type src, Type tar)
           
 boolean isInjective()
           
protected  boolean next(OrdinaryMorphism morph)
          Compute the next completion of morph.
protected  boolean next(OrdinaryMorphism morph, java.util.Enumeration<Node> varnodes, java.util.Enumeration<Arc> varedges)
          Compute the next completion of morph for the nodes and edges specified by Vector varnodes and Vector varedges.
 void reinitializeSolver(boolean doUpdateQueries)
           
 void removeFromObjectVarMap(GraphObject anObj)
           
protected  void removeFromTypeObjectsMap(GraphObject anObj)
           
 void removeProperty(java.lang.String propertyName)
           
protected  void reset()
          Reset my internal state, so that the forthcoming invocation of next() computes the first completion of the given morphism.
 void resetSolver(boolean doUpdateQueries)
           
 void resetSolverVariables()
           
protected  void resetTypeMap(Graph g)
           
protected  void resetTypeMap(java.util.Hashtable<java.lang.String,java.util.Vector<GraphObject>> typemap)
           
protected  void resetVariableDomain(boolean instanceNull)
           
protected  void resetVariableDomain(GraphObject go)
           
protected  void setPartialMorphism(OrdinaryMorphism morph)
           
 void setProperty(java.lang.String propertyName)
           
 void setRelatedInstanceVarMap(java.util.Dictionary<java.lang.Object,Variable> relatedVarMap)
           
 void showProperties()
           
protected  void unsetAttrContextVariable()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itsProperties

protected java.util.BitSet itsProperties

itsName

protected java.lang.String itsName
Constructor Detail

MorphCompletionStrategy

public MorphCompletionStrategy()

MorphCompletionStrategy

protected MorphCompletionStrategy(java.util.BitSet supported_properties)
Attach myself to given ALR morphism completion strategy.

Method Detail

dispose

public void dispose()

initialize

protected void initialize(java.util.BitSet supported_properties,
                          java.util.BitSet active_properties)

getName

public java.lang.String getName()

getSupportedProperties

public final java.util.BitSet getSupportedProperties()
Return information about what properties I support. A property is supported if its corresponding bit is set.

Specified by:
getSupportedProperties in interface StrategyProperties

getProperties

public final java.util.BitSet getProperties()
Return information about what properties are currently activated. Properties can be activated or deactivated by setting or clearing their respective bits via the BitSet interface.

Specified by:
getProperties in interface StrategyProperties

setProperty

public final void setProperty(java.lang.String propertyName)

removeProperty

public final void removeProperty(java.lang.String propertyName)

isInjective

public boolean isInjective()

equals

public final boolean equals(java.lang.Object other)
Return true iff the given object is an instance of the same concrete strategy class as me and has the same property bits set.

Overrides:
equals in class java.lang.Object

reset

protected void reset()
Reset my internal state, so that the forthcoming invocation of next() computes the first completion of the given morphism.


initialize

public void initialize(OrdinaryMorphism morph)

next

protected boolean next(OrdinaryMorphism morph)
Compute the next completion of morph. Invoke this method successively with the same argument to get all completions of a morphism.

Parameters:
morph - the morphism to totalize.
Returns:
false if there are no more completions.

next

protected boolean next(OrdinaryMorphism morph,
                       java.util.Enumeration<Node> varnodes,
                       java.util.Enumeration<Arc> varedges)
Compute the next completion of morph for the nodes and edges specified by Vector varnodes and Vector varedges. Invoke this method successively with the same arguments to get all completions of a morphism.

Returns:
false if there are no more completions.

clone

public java.lang.Object clone()
Return a clone of myself. My property bitset is cloned as well.

Overrides:
clone in class java.lang.Object

forceBackState

public void forceBackState()

getSize

public int getSize()

getAttrContext

public AttrContext getAttrContext()

showProperties

public void showProperties()

resetSolver

public void resetSolver(boolean doUpdateQueries)

reinitializeSolver

public void reinitializeSolver(boolean doUpdateQueries)

resetSolverVariables

public void resetSolverVariables()

removeFromObjectVarMap

public void removeFromObjectVarMap(GraphObject anObj)

removeFromTypeObjectsMap

protected void removeFromTypeObjectsMap(GraphObject anObj)

resetTypeMap

protected void resetTypeMap(Graph g)

resetTypeMap

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

resetVariableDomain

protected void resetVariableDomain(boolean instanceNull)

resetVariableDomain

protected void resetVariableDomain(GraphObject go)

unsetAttrContextVariable

protected void unsetAttrContextVariable()

setPartialMorphism

protected void setPartialMorphism(OrdinaryMorphism morph)

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)

hasRelatedInstanceVarMap

public boolean hasRelatedInstanceVarMap()

getInstanceVarMap

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