|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectagg.xt_basis.MorphCompletionStrategy
agg.xt_basis.Completion_CSP
public class Completion_CSP
An implementation of morphism completion as a Constraint Satisfaction Problem (CSP).
Field Summary | |
---|---|
protected static java.util.BitSet |
itsSupportedProperties
|
protected java.util.Dictionary<java.lang.Object,Variable> |
relatedVarMap
|
Fields inherited from class agg.xt_basis.MorphCompletionStrategy |
---|
itsName, itsProperties |
Fields inherited from interface agg.xt_basis.CompletionPropertyBits |
---|
BITNAME, DANGLING, IDENTIFICATION, INJECTIVE, NAC, PAC |
Constructor Summary | |
---|---|
Completion_CSP()
|
|
Completion_CSP(boolean nonDeterministicSearch)
|
Method Summary | |
---|---|
void |
clear()
|
protected SolutionStrategy |
createSolutionStrategy()
Template method to enable creation of CSPs with varying solution strategies by subclasses. |
void |
dispose()
|
AttrContext |
getAttrContext()
|
java.util.Dictionary<java.lang.Object,Variable> |
getInstanceVarMap()
|
boolean |
hasRelatedInstanceVarMap()
|
void |
initialize(OrdinaryMorphism morph)
Initialize the CSP by the specified morphism. |
void |
initialize(OrdinaryMorphism morph,
java.util.Enumeration<Node> nodes,
java.util.Enumeration<Arc> edges)
Initialize the CSP by the specified morphism. |
boolean |
isDomainOfTypeEmpty(Type t)
|
boolean |
isDomainOfTypeEmpty(Type t,
Type src,
Type tar)
|
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)
|
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 initInstanceByNull)
|
protected void |
resetVariableDomain(GraphObject go)
|
protected void |
setPartialMorphism(OrdinaryMorphism morph)
If an image of the source node or edge exists, set it to be instance of the appropriate CSP variable. |
void |
setProperties(MorphCompletionStrategy fromStrategy)
|
void |
setRelatedInstanceVarMap(java.util.Dictionary<java.lang.Object,Variable> relatedVarMap)
|
protected void |
unsetAttrContextVariable()
|
Methods inherited from class agg.xt_basis.MorphCompletionStrategy |
---|
clone, equals, forceBackState, getName, getProperties, getSize, getSupportedProperties, initialize, isInjective, removeProperty, setProperty, showProperties |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Dictionary<java.lang.Object,Variable> relatedVarMap
protected static final java.util.BitSet itsSupportedProperties
Constructor Detail |
---|
public Completion_CSP()
public Completion_CSP(boolean nonDeterministicSearch)
Method Detail |
---|
public void setProperties(MorphCompletionStrategy fromStrategy)
public void clear()
public void dispose()
dispose
in class MorphCompletionStrategy
public final void initialize(OrdinaryMorphism morph) throws BadMappingException
initialize
in class MorphCompletionStrategy
BadMappingException
public final void initialize(OrdinaryMorphism morph, java.util.Enumeration<Node> nodes, java.util.Enumeration<Arc> edges) throws BadMappingException
BadMappingException
protected void setPartialMorphism(OrdinaryMorphism morph)
setPartialMorphism
in class MorphCompletionStrategy
protected SolutionStrategy createSolutionStrategy()
protected final void reset()
MorphCompletionStrategy
next()
computes the first completion of the given
morphism.
reset
in class MorphCompletionStrategy
public AttrContext getAttrContext()
getAttrContext
in class MorphCompletionStrategy
public void resetSolver(boolean doUpdateQueries)
resetSolver
in class MorphCompletionStrategy
public void reinitializeSolver(boolean doUpdateQueries)
reinitializeSolver
in class MorphCompletionStrategy
public void resetSolverVariables()
resetSolverVariables
in class MorphCompletionStrategy
public boolean isDomainOfTypeEmpty(Type t)
isDomainOfTypeEmpty
in class MorphCompletionStrategy
public boolean isDomainOfTypeEmpty(Type t, Type src, Type tar)
isDomainOfTypeEmpty
in class MorphCompletionStrategy
public void setRelatedInstanceVarMap(java.util.Dictionary<java.lang.Object,Variable> relatedVarMap)
setRelatedInstanceVarMap
in class MorphCompletionStrategy
public boolean hasRelatedInstanceVarMap()
hasRelatedInstanceVarMap
in class MorphCompletionStrategy
public java.util.Dictionary<java.lang.Object,Variable> getInstanceVarMap()
getInstanceVarMap
in class MorphCompletionStrategy
public void removeFromObjectVarMap(GraphObject anObj)
removeFromObjectVarMap
in class MorphCompletionStrategy
protected void removeFromTypeObjectsMap(GraphObject anObj)
removeFromTypeObjectsMap
in class MorphCompletionStrategy
protected void resetTypeMap(java.util.Hashtable<java.lang.String,java.util.Vector<GraphObject>> typeMap)
resetTypeMap
in class MorphCompletionStrategy
protected void resetTypeMap(Graph g)
resetTypeMap
in class MorphCompletionStrategy
protected void resetVariableDomain(boolean initInstanceByNull)
resetVariableDomain
in class MorphCompletionStrategy
protected void resetVariableDomain(GraphObject go)
resetVariableDomain
in class MorphCompletionStrategy
protected void unsetAttrContextVariable()
unsetAttrContextVariable
in class MorphCompletionStrategy
protected final boolean next(OrdinaryMorphism morph)
MorphCompletionStrategy
morph
. Invoke this method
successively with the same argument to get all completions of a morphism.
next
in class MorphCompletionStrategy
morph
- the morphism to totalize.
false
if there are no more completions.protected final boolean next(OrdinaryMorphism morph, java.util.Enumeration<Node> varnodes, java.util.Enumeration<Arc> varedges)
MorphCompletionStrategy
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.
next
in class MorphCompletionStrategy
false
if there are no more completions.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |