|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
agg.util.ExtObservable
agg.xt_basis.Graph
public class Graph
This class extends simple graphs with the possibility to have arcs between nodes.
Field Summary | |
---|---|
protected boolean |
attributed
|
protected boolean |
changed
|
protected java.lang.String |
comment
|
protected boolean |
completeGraph
true, if this graph is a complete graph. |
protected java.lang.String |
info
|
protected java.util.Vector<Arc> |
itsArcs
|
protected AttrContext |
itsAttrContext
|
protected AttrManager |
itsAttrManager
|
protected java.lang.String |
itsName
|
protected java.util.Vector<Node> |
itsNodes
|
protected java.util.Hashtable<java.lang.String,java.util.List<GraphObject>> |
itsTypeObjectsMap
|
protected TypeSet |
itsTypes
object for creating types, checking types and holding the type graph |
protected java.util.List<OrdinaryMorphism> |
itsUsingMorphs
|
protected java.lang.String |
kind
|
protected java.util.List<java.util.Observer> |
observer
|
Fields inherited from interface com.objectspace.jgl.UnaryFunction |
---|
serialVersionUID |
Constructor Summary | |
---|---|
Graph()
Creates an empty graph with an empty TypeSet. |
|
Graph(boolean completeGraph)
Creates an empty graph with an empty TypeSet. |
|
Graph(TypeSet aTypeSet)
Creates an empty graph with the specified TypeSet. |
|
Graph(TypeSet aTypeSet,
boolean completeGraph)
Creates an empty graph with the specified TypeSet. |
Method Summary | |
---|---|
void |
addArc(Arc a)
Adds the specified edge to my edges. |
boolean |
addCopyOfGraph(Graph g,
boolean disabledTypeGraphOnly)
Tries to add a copy of the specified graph to my elements. |
void |
addNode(Node n)
Adds the specified node to my nodes. |
void |
addObserver(java.util.Observer o)
|
void |
addUsingMorph(OrdinaryMorphism m)
Stores the specified morphism if it is its source or target graph. |
boolean |
areAnyAttributesOfArcsSet()
|
boolean |
areAnyAttributesOfNodesSet()
|
TypeError |
checkConnectValid(Type edgeType,
Node source,
Node target)
Checks if the specified edge to create is allowed. |
TypeError |
checkCreateGraphObject(Type nodeType,
int currentTypeGraphLevel)
Returns en error if the type multiplicity check failed after a node of the specified type would be created, otherwise - null. |
TypeError |
checkCreateGraphObject(Type edgeType,
Node source,
Node target,
int currentTypeGraphLevel)
Returns en error if the type multiplicity check failed after an edge of the specified type would be created, otherwise - null. |
protected void |
checkIsomorphicInclusions(java.util.Vector<OrdinaryMorphism> inclusions)
|
void |
clear()
Delete all of my graph objects. |
boolean |
compareTo(Graph g)
|
boolean |
contains(Graph g)
|
boolean |
contains(Graph g,
MorphCompletionStrategy mcs)
|
Graph |
copy()
Returns a flat copy (without references) of this graph. |
Graph |
copy(java.util.Hashtable<GraphObject,GraphObject> orig2copy)
Makes a copy of this graph |
Graph |
copy(TypeSet types)
Returns a copy of this graph using specified type set. |
Arc |
copyArc(Arc orig,
Node src,
Node tar)
Creates a new Arc as a copy of the orig . |
Graph |
copyLight(TypeSet typeSet)
|
Node |
copyNode(Node orig)
Creates a new node as a copy of the specified orig . |
Arc |
createArc(Type type,
Node src,
Node tar)
Creates and add a new Arc of the specified type, source and target nodes, which must be part of this graph. |
Node |
createNode(Node orig)
Deprecated. use the method copyNode(Node orig) |
Node |
createNode(Type type)
Creates and adds a new Node of the specified type. |
Type |
createType()
Deprecated. moved to TypeSet |
void |
deleteObserver(java.util.Observer o)
|
void |
destroyArc(Arc arc)
Deletes the specified arc. |
void |
destroyArc(Arc arc,
boolean checkFirst)
Deletes the specified arc. |
void |
destroyArc(Arc arc,
boolean checkFirst,
boolean forceDestroy)
Deletes the specified arc. |
void |
destroyNode(Node node)
Deletes a Node. |
void |
destroyNode(Node node,
boolean checkFirst)
Deletes a Node. |
void |
destroyNode(Node node,
boolean checkFirst,
boolean forceDestroy)
Deletes a Node. |
void |
destroyObject(GraphObject obj)
|
boolean |
destroyObjectsOfType(Type t)
|
java.util.Vector<java.lang.String> |
destroyObjectsOfTypes(java.util.Vector<Type> types)
|
void |
destroyType(Type type)
Deprecated. moved to TypeSet |
void |
dispose()
Prepares this graph for garbage collection, so cut all connections to other objects and dispose all graph object contained. |
java.lang.Object |
execute(java.lang.Object obj)
Deprecated. use copyNode(agg.xt_basis.Node) or copyArc(agg.xt_basis.Arc, agg.xt_basis.Node, agg.xt_basis.Node) , this method
cannot work properly in case a type graph is defined and in
use. |
protected void |
fillTypeObjectsMap()
|
void |
finalize()
|
void |
forceDestroyObject(GraphObject obj)
|
java.util.Vector<OrdinaryMorphism> |
generateAllSubgraphs(int sizeOfInclusions,
boolean union,
boolean withIsomorphic)
Returns a set of OrdinaryMorphism, where the source graph is a subGraph and the target graph is this graph. |
java.util.Vector<OrdinaryMorphism> |
generateAllSubgraphsWithInclusionsOfSize(int i,
java.util.Vector<GraphObject> itsGOSet,
java.util.Vector<OrdinaryMorphism> inclusions,
boolean withIsomorphic)
Returns a set of OrdinaryMorphism, where the source graph is a subGraph and the target graph is this graph. |
java.util.Enumeration<Arc> |
getArcs()
Iterate through my Arcs. |
java.util.Vector<Arc> |
getArcs(GraphObject src,
GraphObject tar)
Returns edges found between specified source and target objects. |
java.util.Vector<Arc> |
getArcs(Type t,
GraphObject src,
GraphObject tar)
Iterate through my edges to find edges of the specified type between the specified source and target. |
int |
getArcsCount()
|
java.util.List<Arc> |
getArcsList()
|
AttrContext |
getAttrContext()
|
AttrManager |
getAttrManager()
|
java.util.Enumeration<GraphObject> |
getElements()
Iterate through my nodes and arcs. |
java.util.Enumeration<GraphObject> |
getElementsOfType(GraphObject type)
Iterate through my Nodes and Arcs * to find all elements of type with specified type. |
java.util.Enumeration<GraphObject> |
getElementsOfType(java.lang.String typeName)
Iterate through my nodes and arcs to find all elements of type with specified typeName. |
java.util.Enumeration<GraphObject> |
getElementsOfType(Type type)
Iterate through my nodes and arcs to find all elements of type with specified type. |
java.util.Enumeration<GraphObject> |
getElementsOfType(Type type,
Type src,
Type tar)
Iterate through my arcs to find all elements of type with specified type, source and target. |
java.util.Vector<GraphObject> |
getElementsOfTypeAsVector(GraphObject type)
Iterate through my Nodes and Arcs to find all elements of type with specified type. |
java.util.Vector<GraphObject> |
getElementsOfTypeAsVector(java.lang.String typeName)
Iterate through my Nodes and Arcs to find all elements of type with specified typeName. |
java.util.Vector<GraphObject> |
getElementsOfTypeAsVector(Type type)
Iterate through my Nodes and Arcs to find all elements of type with specified type. |
java.util.Vector<GraphObject> |
getElementsOfTypeAsVector(Type type,
boolean withChildren)
|
java.util.Vector<GraphObject> |
getElementsOfTypeAsVector(Type type,
Type src,
Type tar)
Iterate through my edges to find all edges of the specified type. |
java.lang.String |
getHelpInfo()
|
java.lang.String |
getHelpInfoAboutNAC()
|
java.lang.String |
getHelpInfoAboutPAC()
|
java.lang.String |
getHelpInfoAboutVariableEquality()
|
int |
getIndexOf(GraphObject obj)
Deprecated. use getIndexOfNode or getIndexOfArc |
int |
getIndexOfArc(GraphObject obj)
|
int |
getIndexOfNode(GraphObject obj)
|
OrdinaryMorphism |
getIsomorphicWith(Graph g)
Tries to compute an isomorphic morphism of this graph into the specified graph g. |
java.util.Vector<OrdinaryMorphism> |
getIsomorphicWith(Graph g,
boolean all)
Tries to compute all isomorphic morphisms of this graph into the specified graph g. |
java.util.Vector<OrdinaryMorphism> |
getIsomorphicWith(Graph g,
java.util.Hashtable<GraphObject,GraphObject> map)
Tries to compute isomorphic morphisms of this graph into the specified graph. |
java.lang.String |
getKind()
A kind is a role of a graph in a grammar, for exmpl.: a type graph - TG, a host graph - HOST, the left graph of a rule - LHS, the right graph of a rule - RHS, a NAC graph - NAC, a PAC graph - PAC and so on. |
java.lang.String |
getName()
|
java.util.Enumeration<Node> |
getNodes()
|
java.util.Vector<Node> |
getNodes(Type t)
Returns nodes of the specified type. |
java.util.Vector<Node> |
getNodesByCompareType(Type t)
Iterate through my nodes to find nodes with type equal to the specified type. |
java.util.Vector<Node> |
getNodesByParentType(Type t)
Iterate through my nodes to find related nodes of the specified type. |
int |
getNodesCount()
|
java.util.List<Node> |
getNodesList()
|
java.util.List<java.util.Observer> |
getObservers()
|
java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> |
getOverlappings(Graph g,
boolean withIsomorphic)
Computes an overlapping set without disjoint union. |
java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> |
getOverlappings(Graph g,
boolean disjunion,
boolean withIsomorphic)
Computes an overlapping set. |
java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> |
getOverlappings(Graph g,
int sizeOfInclusions,
boolean withIsomorphic)
Computes an overlapping set without the disjoint union. |
java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> |
getOverlappings(Graph g,
int sizeOfInclusions,
boolean disjunion,
boolean withIsomorphic)
Computes an overlapping set. |
java.util.Vector<java.util.Hashtable<GraphObject,GraphObject>> |
getPartialMorphismIntoSet(java.util.Vector<GraphObject> set)
Tries to compute partial morphisms of this graph into the specified set of graph objects. |
java.util.Vector<VarMember> |
getSameVariablesOfAttributes()
|
int |
getSize()
|
int |
getSizeOfArcs()
Deprecated. replaced by getArcsCount() |
int |
getSizeOfNodes()
Deprecated. replaced by getNodesCount() |
java.lang.String |
getTextualComment()
Return textual comments of this graph. |
java.util.Vector<java.lang.String> |
getTypeNamesOfGraphObjects()
Returns type names of nodes and edges of this graph. |
java.util.Hashtable<java.lang.String,java.util.List<GraphObject>> |
getTypeObjectsMap()
Returns object domains for used types. |
java.util.Enumeration<Type> |
getTypes()
Deprecated. moved to TypeSet |
TypeSet |
getTypeSet()
Returns its type set. |
java.util.Vector<Type> |
getUsedAndInheritedTypes()
|
java.util.Vector<Type> |
getUsedTypes()
|
java.util.Vector<java.lang.String> |
getVariableNamesOfAttributes()
|
boolean |
glue(GraphObject keep,
GraphObject glue)
Tries to glue two graph objects. |
Graph |
graphcopy()
The method returns a flat copy of the graph itself. |
Graph |
graphcopy(Graph g)
Pre-condition: this graph has to be empty and has to use the same type set as the Graph g . |
Graph |
graphcopy(int n)
Returns a flat copy of the graph itself. |
void |
graphDidChange()
|
boolean |
isArc(Arc obj)
Returns true if its arcs contain the specified arc. |
protected boolean |
isArcAttributeSet(java.util.Vector<GraphObject> storeOfFailedObjs)
|
boolean |
isAttributed()
|
boolean |
isCompleteGraph()
Returns true, if this graph is a complete graph. |
boolean |
isElement(GraphObject obj)
Returns true if it contains the specified graph object. |
boolean |
isEmpty()
|
boolean |
isGraph(java.util.Vector<GraphObject> goSet)
Returns true if the given set of graph objects represents a valid graph. |
boolean |
isIsomorphicTo(Graph g)
Return an Enumeration of all of my subgraphs (not including myself). * Enumeration elements are of type SubGraph . |
boolean |
isNacGraph()
return TRUE if this graph is a NAC graph |
boolean |
isNode(Node obj)
Returns true if its nodes contain the specified node. |
protected boolean |
isNodeAttributeSet(java.util.Vector<GraphObject> storeOfFailedObjs)
|
boolean |
isNotificationRequired()
|
OrdinaryMorphism |
isomorphicCopy()
Returns an isomorphism between this graph and its ad-hoc-created copy. |
OrdinaryMorphism |
isoToCopy()
Deprecated. replaced by isomorphicCopy() |
OrdinaryMorphism |
isoToCopy(int n)
Deprecated. replaced by isomorphicCopy() |
boolean |
isPacGraph()
return TRUE if this graph is a PAC graph |
boolean |
isReadyForTransform()
Returns false if not all attributes of its graph objects are set, otherwise - true. |
boolean |
isReadyForTransform(java.util.Vector<GraphObject> storeOfFailedObjs)
Returns false if not all attributes of its graph objects are set, otherwise - true. |
boolean |
isTypeGraph()
Returns true if this graph is used as a type graph. |
boolean |
isUsingType(GraphObject t)
Returns true if this graph uses the specified type. |
boolean |
isUsingType(Type t)
|
boolean |
isUsingVariable(VarMember v)
|
protected Arc |
newArc(Type t,
Node src,
Node tar)
Creates and adds a new arc. |
protected Node |
newNode(Type t)
Creates and adds a new node. |
java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> |
overlapSet(Graph g,
int memoNumber,
boolean withIsomorphic)
Computes all possible overlappings (withoutdisjoint union) of this and another graph g. |
java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> |
overlapSet(Graph g,
int memoNumber,
boolean union,
boolean withIsomorphic)
Compute all possible overlappings of this and another graph g. |
java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> |
overlapSet(Graph g,
int sizeOfInclusions,
int memoNumber,
boolean union,
boolean withIsomorphic)
Computes possible overlappings with defined size of inclusions of this and another graph g. |
protected void |
propagateChange(Change ch)
|
protected void |
removeArc(Arc a)
|
protected void |
removeNode(Node n)
|
boolean |
removeUsingMorph(OrdinaryMorphism m)
Removes the specified morphism from stored morphisms. |
OrdinaryMorphism |
reverseIsomorphicCopy()
Returns an isomorphism between ad-hoc-created copy and this graph. |
void |
setAttrContext(AttrContext context)
|
void |
setCompleteGraph(boolean complete)
A complete graph is not allowed to use variables in attributes of its node and edges. |
void |
setHelpInfo(java.lang.String str)
The user of AGG APIs can set help info for his own purposes. |
void |
setKind(java.lang.String aKind)
A kind is a role of a graph in a grammar, for exmpl.: a type graph - TG, a host graph - HOST, the left graph of a rule - LHS, the right graph of a rule - RHS, a NAC graph - NAC, a PAC graph - PAC and so on. |
void |
setNacGraph(boolean isNAC)
Deprecated. not more needed, set already implicitely |
void |
setName(java.lang.String n)
|
void |
setNotificationRequired(boolean b)
|
void |
setObservers(java.util.List<?> o)
|
void |
setPacGraph(boolean isPAC)
Deprecated. not more needed, set already implicitely |
void |
setTextualComment(java.lang.String text)
Set textual comments (description) of this graph. |
void |
setTypeSet(TypeSet types)
Set the given type set to its type set. |
protected java.lang.String |
showArcs()
|
protected java.lang.String |
showGraph()
|
protected java.lang.String |
showNodes()
|
java.lang.String |
toString()
|
void |
unsetAttributeValueWhereVariable()
|
void |
unsetCriticalObjects()
|
void |
unsetTransientAttrValues()
|
void |
update(java.util.Observable obs,
java.lang.Object change)
|
void |
updateTypeObjectsMap()
Refreshs object domains for used types. |
void |
XreadObject(XMLHelper h)
Implements the interface of XMLObject |
void |
XwriteObject(XMLHelper h)
Implements the interface of XMLObject |
Methods inherited from class agg.util.ExtObservable |
---|
setChanged |
Methods inherited from class java.util.Observable |
---|
clearChanged, countObservers, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String kind
protected java.lang.String comment
protected java.lang.String itsName
protected final java.util.Vector<Node> itsNodes
protected final java.util.Vector<Arc> itsArcs
protected final java.util.List<OrdinaryMorphism> itsUsingMorphs
protected AttrContext itsAttrContext
protected AttrManager itsAttrManager
protected java.util.List<java.util.Observer> observer
protected TypeSet itsTypes
protected final java.util.Hashtable<java.lang.String,java.util.List<GraphObject>> itsTypeObjectsMap
protected boolean completeGraph
protected boolean attributed
protected java.lang.String info
protected boolean changed
Constructor Detail |
---|
public Graph()
Graph(boolean)
, to create a complete graph
(a host graph).
public Graph(TypeSet aTypeSet)
Graph(TypeSet,boolean)
, to create a complete
graph (a host graph).
public Graph(boolean completeGraph)
completeGraph
- true, to create a host graphpublic Graph(TypeSet aTypeSet, boolean completeGraph)
aTypeSet
- the TypeSet to usecompleteGraph
- true, to create a host graphMethod Detail |
---|
public void addObserver(java.util.Observer o)
addObserver
in class java.util.Observable
Observable.addObserver(java.util.Observer)
public void deleteObserver(java.util.Observer o)
deleteObserver
in class java.util.Observable
Observable.deleteObserver(java.util.Observer)
public java.util.List<java.util.Observer> getObservers()
public void setObservers(java.util.List<?> o)
public java.lang.String getKind()
GraphKind
public void setKind(java.lang.String aKind)
GraphKind
public void setNotificationRequired(boolean b)
public boolean isNotificationRequired()
public void setTypeSet(TypeSet types)
types
- a type set which contains all types already used in this
graph. This won't be checked.public TypeSet getTypeSet()
public boolean addCopyOfGraph(Graph g, boolean disabledTypeGraphOnly)
g
-
public Graph copyLight(TypeSet typeSet)
public Graph copy(TypeSet types)
public Graph copy(java.util.Hashtable<GraphObject,GraphObject> orig2copy)
orig2copy
- the specified table is used to store pairs (original, copy),
where an original is a node/edge of this graph and a copy
is a copied node/edge of the graph copy.
public Graph graphcopy(int n)
CopyMemory
. The method
CopyMemory.REQUEST(n)
returns an appropriate Hashtable.
n
- can be 1 or 2.public Graph graphcopy()
public Graph copy()
public Graph graphcopy(Graph g)
public void dispose()
dispose
in interface Disposable
dispose
in class ExtObservable
Change_ObservableGone
public void finalize()
finalize
in class ExtObservable
public final void update(java.util.Observable obs, java.lang.Object change)
update
in interface java.util.Observer
public final void setName(java.lang.String n)
public final java.lang.String getName()
public void setHelpInfo(java.lang.String str)
str
- help infopublic java.lang.String getHelpInfo()
public java.lang.String getHelpInfoAboutVariableEquality()
public java.lang.String getHelpInfoAboutPAC()
public java.lang.String getHelpInfoAboutNAC()
public void setTextualComment(java.lang.String text)
public java.lang.String getTextualComment()
public final Type createType()
TypeSet
public void destroyType(Type type) throws TypeException
TypeSet
TypeException
public final java.util.Enumeration<Type> getTypes()
TypeSet
Type
public java.util.Vector<Type> getUsedTypes()
public java.util.Vector<Type> getUsedAndInheritedTypes()
public void addNode(Node n)
protected void removeNode(Node n)
public void addArc(Arc a)
protected void removeArc(Arc a)
protected Node newNode(Type t) throws TypeException
TypeException
public Node createNode(Type type) throws TypeException
TypeException
public Node createNode(Node orig) throws TypeException
copyNode(Node orig)
TypeException
public Node copyNode(Node orig) throws TypeException
orig
.
Only type and attributes are copied,
the structural context (incoming/outgoing arcs) - is not.
TypeException
public void destroyNode(Node node) throws TypeException
TypeException
- If this graph is a type graph, and there are nodes of this
type node in one of other graphs, an exception is thrown.public void destroyNode(Node node, boolean checkFirst) throws TypeException
TypeException
- If this graph is a type graph, and there are nodes of this
type node in one of other graphs, an exception is thrown.public void destroyNode(Node node, boolean checkFirst, boolean forceDestroy) throws TypeException
TypeException
- If this graph is a type graph, and there are nodes of this
type node in one of other graphs, an exception is thrown when
forceDestroy is false, otherwise - does thrown any exception.protected Arc newArc(Type t, Node src, Node tar) throws TypeException
TypeException
public Arc createArc(Type type, Node src, Node tar) throws TypeException
TypeException
public Arc copyArc(Arc orig, Node src, Node tar) throws TypeException
orig
.
Only its type and attributes are copied,
the structural context (source, target) - is not.
The specified source src
and target tar
objects
must be a part of this graph, but this is not checked here.
TypeException
public void destroyArc(Arc arc) throws TypeException
TypeException
- If this graph is a type graph, and there are arcs of this
type arc in one of other graphs, an exception is thrown.public void destroyArc(Arc arc, boolean checkFirst) throws TypeException
TypeException
- If this graph is a type graph, and there are arcs of this
type arc in one of other graphs, an exception is thrown.public void destroyArc(Arc arc, boolean checkFirst, boolean forceDestroy) throws TypeException
TypeException
- If this graph is a type graph, and there are arcs of this
type arc in one of other graphs, an exception is thrown when
forceDestroy is false, otherwise - does thrown any exception.public void destroyObject(GraphObject obj) throws TypeException
TypeException
public void forceDestroyObject(GraphObject obj) throws TypeException
TypeException
public boolean destroyObjectsOfType(Type t)
public java.util.Vector<java.lang.String> destroyObjectsOfTypes(java.util.Vector<Type> types)
public java.util.Enumeration<Node> getNodes()
public java.util.List<Node> getNodesList()
public int getNodesCount()
public java.util.Enumeration<Arc> getArcs()
*
public java.util.List<Arc> getArcsList()
public int getArcsCount()
public java.util.Vector<Arc> getArcs(GraphObject src, GraphObject tar)
public java.util.Vector<Node> getNodes(Type t)
public java.util.Vector<Node> getNodesByParentType(Type t)
public java.util.Vector<Node> getNodesByCompareType(Type t)
public java.util.Vector<Arc> getArcs(Type t, GraphObject src, GraphObject tar)
public java.util.Vector<java.lang.String> getTypeNamesOfGraphObjects()
public int getIndexOf(GraphObject obj)
getIndexOfNode
or getIndexOfArc
public int getIndexOfNode(GraphObject obj)
public int getIndexOfArc(GraphObject obj)
public java.util.Enumeration<GraphObject> getElements()
GraphObject
public java.util.Enumeration<GraphObject> getElementsOfType(java.lang.String typeName)
GraphObject
public java.util.Vector<GraphObject> getElementsOfTypeAsVector(java.lang.String typeName)
GraphObject
public java.util.Enumeration<GraphObject> getElementsOfType(Type type)
GraphObject
public java.util.Vector<GraphObject> getElementsOfTypeAsVector(Type type)
GraphObject
public java.util.Vector<GraphObject> getElementsOfTypeAsVector(Type type, boolean withChildren)
public java.util.Enumeration<GraphObject> getElementsOfType(Type type, Type src, Type tar)
GraphObject
public java.util.Vector<GraphObject> getElementsOfTypeAsVector(Type type, Type src, Type tar)
GraphObject
public java.util.Enumeration<GraphObject> getElementsOfType(GraphObject type)
GraphObject
public java.util.Vector<GraphObject> getElementsOfTypeAsVector(GraphObject type)
GraphObject
public void setAttrContext(AttrContext context)
public AttrContext getAttrContext()
public AttrManager getAttrManager()
protected void propagateChange(Change ch)
public void addUsingMorph(OrdinaryMorphism m)
m
- public boolean removeUsingMorph(OrdinaryMorphism m)
public boolean isEmpty()
public boolean isElement(GraphObject obj)
true
if it contains the specified graph object.
public boolean isNode(Node obj)
true
if its nodes contain the specified node.
public boolean isArc(Arc obj)
true
if its arcs contain the specified arc.
public boolean isUsingType(GraphObject t)
true
if this graph uses the specified type.
public boolean isUsingType(Type t)
public boolean isUsingVariable(VarMember v)
public void clear()
Post: isEmpty()
*
public boolean glue(GraphObject keep, GraphObject glue)
public boolean isReadyForTransform()
protected boolean isNodeAttributeSet(java.util.Vector<GraphObject> storeOfFailedObjs)
protected boolean isArcAttributeSet(java.util.Vector<GraphObject> storeOfFailedObjs)
public boolean isReadyForTransform(java.util.Vector<GraphObject> storeOfFailedObjs)
storeOfFailedObjs
will contain nodes and edges which are
not initialized completely.
public boolean isIsomorphicTo(Graph g)
SubGraph
.
*
public OrdinaryMorphism getIsomorphicWith(Graph g)
g
- is target graph of the result morphism
public java.util.Vector<OrdinaryMorphism> getIsomorphicWith(Graph g, java.util.Hashtable<GraphObject,GraphObject> map)
g
- the target graph of a morphismmap
- contains morphism mappings : keys are elements of
this graph, values are elements of the graph g.
public java.util.Vector<OrdinaryMorphism> getIsomorphicWith(Graph g, boolean all)
g
- is target graph of morphismsall
- is true - compute all possible isomorphic morphisms,
otherwise - only first one.
public OrdinaryMorphism isomorphicCopy()
public OrdinaryMorphism isoToCopy(int n)
isomorphicCopy()
public OrdinaryMorphism isoToCopy()
isomorphicCopy()
public OrdinaryMorphism reverseIsomorphicCopy()
public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g, int memoNumber, boolean withIsomorphic)
public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g, int memoNumber, boolean union, boolean withIsomorphic)
public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g, int sizeOfInclusions, int memoNumber, boolean union, boolean withIsomorphic)
public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g, boolean withIsomorphic)
g
- The graph to overlap withpublic java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g, boolean disjunion, boolean withIsomorphic)
g
- The graph to overlap withdisjunion
- true if disjoint union is wantedpublic java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g, int sizeOfInclusions, boolean withIsomorphic)
g
- The graph to overlap withpublic java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g, int sizeOfInclusions, boolean disjunion, boolean withIsomorphic)
g
- The graph to overlap withdisjunion
- true if disjoint union is wantedpublic void XwriteObject(XMLHelper h)
XwriteObject
in interface XMLObject
public void XreadObject(XMLHelper h)
XreadObject
in interface XMLObject
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String showGraph()
protected java.lang.String showNodes()
protected java.lang.String showArcs()
public java.util.Vector<OrdinaryMorphism> generateAllSubgraphs(int sizeOfInclusions, boolean union, boolean withIsomorphic)
public java.util.Vector<OrdinaryMorphism> generateAllSubgraphsWithInclusionsOfSize(int i, java.util.Vector<GraphObject> itsGOSet, java.util.Vector<OrdinaryMorphism> inclusions, boolean withIsomorphic)
public boolean isGraph(java.util.Vector<GraphObject> goSet)
goSet
- a Vector of GraphObjectsGraphObject
,
TypeSet.checkType(Graph)
public boolean isTypeGraph()
TypeSet
.
public boolean isAttributed()
public boolean areAnyAttributesOfNodesSet()
public boolean areAnyAttributesOfArcsSet()
public boolean isCompleteGraph()
public void setCompleteGraph(boolean complete)
public boolean isNacGraph()
public void setNacGraph(boolean isNAC)
public boolean isPacGraph()
public void setPacGraph(boolean isPAC)
public boolean compareTo(Graph g)
public boolean contains(Graph g)
public boolean contains(Graph g, MorphCompletionStrategy mcs)
public int getSize()
public int getSizeOfNodes()
getNodesCount()
public int getSizeOfArcs()
getArcsCount()
protected void checkIsomorphicInclusions(java.util.Vector<OrdinaryMorphism> inclusions)
public TypeError checkConnectValid(Type edgeType, Node source, Node target)
public TypeError checkCreateGraphObject(Type nodeType, int currentTypeGraphLevel)
public TypeError checkCreateGraphObject(Type edgeType, Node source, Node target, int currentTypeGraphLevel)
public java.util.Vector<java.lang.String> getVariableNamesOfAttributes()
public java.util.Vector<VarMember> getSameVariablesOfAttributes()
public final java.lang.Object execute(java.lang.Object obj)
copyNode(agg.xt_basis.Node)
or copyArc(agg.xt_basis.Arc, agg.xt_basis.Node, agg.xt_basis.Node)
, this method
cannot work properly in case a type graph is defined and in
use.
execute
in interface com.objectspace.jgl.UnaryFunction
public void graphDidChange()
public void unsetCriticalObjects()
public void unsetTransientAttrValues()
public void unsetAttributeValueWhereVariable()
public java.util.Vector<java.util.Hashtable<GraphObject,GraphObject>> getPartialMorphismIntoSet(java.util.Vector<GraphObject> set)
set
- is target of morphisms
public java.util.Hashtable<java.lang.String,java.util.List<GraphObject>> getTypeObjectsMap()
type.convertToKey()
,
the key of an arc type by
srcNodeType.convertToKey()+type.convertToKey()+tarNodeType.convertToKey()
.
public void updateTypeObjectsMap()
protected void fillTypeObjectsMap()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |