Click or drag to resize

INamedGraph Interface

An named IGraph (which is an attributed, typed and directed multigraph with multiple inheritance on node and edge types), with a unique name assigned to each node and edge; allowing to access an element by name and a name by element.

Namespace:  de.unika.ipd.grGen.libGr
Assembly:  libGr (in libGr.dll) Version: GrGen.NET 4.5
Syntax
C#
public interface INamedGraph : IGraph

The INamedGraph type exposes the following members.

Properties
  NameDescription
Public propertyBackend
The backend that created the graph
(Inherited from IGraph.)
Public propertyChangesCounter
Returns a counter of the number of changes that occured since the graph was created. If it's different since last time you visited, the graph has changed (but it may be back again in the original state). Only graph structure changes are counted, attribute changes are not included.
(Inherited from IGraph.)
Public propertyEdges
Enumerates all edges in the graph.
(Inherited from IGraph.)
Public propertyGraphId
A unique id associated with the graph
(Inherited from IGraph.)
Public propertyIndices
The indices associated with the graph.
(Inherited from IGraph.)
Public propertyModel
The model associated with the graph.
(Inherited from IGraph.)
Public propertyName
A name associated with the graph.
(Inherited from IGraph.)
Public propertyNodes
Enumerates all nodes in the graph.
(Inherited from IGraph.)
Public propertyNumEdges
The total number of edges in the graph.
(Inherited from IGraph.)
Public propertyNumNodes
The total number of nodes in the graph.
(Inherited from IGraph.)
Public propertyReuseOptimization
If true (the default case), elements deleted during a rewrite may be reused in the same rewrite. As a result new elements may not be discriminable anymore from already deleted elements using object equality, hash maps, etc. In cases where this is needed this optimization should be disabled.
(Inherited from IGraph.)
Top
Methods
  NameDescription
Public methodAddEdge(IEdge)
Adds an existing IEdge object to the graph. The edge must not be part of any graph, yet! Source and target of the edge must already be part of the graph.
(Inherited from IGraph.)
Public methodAddEdge(IEdge, String)
Adds an existing edge to the graph, names it, and assigns it to the given variable.
Public methodAddEdge(EdgeType, INode, INode)
Adds a new edge to the graph.
(Inherited from IGraph.)
Public methodAddEdge(EdgeType, INode, INode, String)
Adds a new named edge to the graph and assigns it to the given variable.
Public methodAddNode(INode)
Adds an existing INode object to the graph. The node must not be part of any graph, yet! The node may not be connected to any other elements!
(Inherited from IGraph.)
Public methodAddNode(NodeType)
Adds a new node to the graph.
(Inherited from IGraph.)
Public methodAddNode(INode, String)
Adds an existing node to the graph and names it.
Public methodAddNode(NodeType, String)
Adds a new named node to the graph.
Public methodAllocateVisitedFlag
Allocates a visited flag on the graph elements.
(Inherited from IGraph.)
Public methodCanonize
Returns a canonical representation of the graph as a string
(Inherited from IGraph.)
Public methodChangedEdgeAttribute
Fires an OnChangedEdgeAttribute event. For debugging, won't be automatically called in case of -nodebugevents, attribute change rollback is based on the pre-events.
(Inherited from IGraph.)
Public methodChangedNodeAttribute
Fires an OnChangedNodeAttribute event. For debugging, won't be automatically called in case of -nodebugevents, attribute change rollback is based on the pre-events.
(Inherited from IGraph.)
Public methodChangingEdgeAttribute
Fires an OnChangingEdgeAttribute event. To be called before changing an attribute of an edge, with exact information about the change to occur, to allow rollback of changes, in case a transaction is underway.
(Inherited from IGraph.)
Public methodChangingNodeAttribute
Fires an OnChangingNodeAttribute event. To be called before changing an attribute of a node, with exact information about the change to occur, to allow rollback of changes, in case a transaction is underway.
(Inherited from IGraph.)
Public methodCheck
Checks whether the internal data structures are ok (will throw an exception if they are not). This is for debugging the underlying implementation from positions outside the implementation.
(Inherited from IGraph.)
Public methodClear
Removes all nodes and edges from the graph (so any variables pointing to them start dangling).
(Inherited from IGraph.)
Public methodClone
Duplicates a graph. The new graph will use the same model and backend as the other.
(Inherited from IGraph.)
Public methodCloneAndAssignNames
Duplicates a graph, assigning names. (Don't use this on a named graph.) The new graph will use the same model and backend as the other.
(Inherited from IGraph.)
Public methodCloneNamed
Duplicates a named graph. The new graph will use the same model and backend as the other.
Public methodCreateEmptyEquivalent
Creates an empty graph using the same model and backend as the other.
(Inherited from IGraph.)
Public methodCustom
Does graph-backend dependent stuff.
(Inherited from IGraph.)
Public methodFreeVisitedFlag
Frees a visited flag. This is a safe but O(n) operation, as it resets the visited flag in the graph.
(Inherited from IGraph.)
Public methodFreeVisitedFlagNonReset
Frees a clean visited flag. This is an O(1) but potentially unsafe operation. Attention! A marked element stays marked, so a later allocation hands out a dirty visited flag! Use only if you can ensure that all elements of that flag are unmarked before calling.
(Inherited from IGraph.)
Public methodGetAllocatedVisitedFlags
Returns the ids of the allocated visited flags.
(Inherited from IGraph.)
Public methodGetCompatibleEdges
Enumerates all edges compatible to the given edge type.
(Inherited from IGraph.)
Public methodGetCompatibleNodes
Enumerates all nodes compatible to the given node type.
(Inherited from IGraph.)
Public methodGetEdge(Int32)
Gets the edge for the given id. Only available if the unique index was declared in the model.
(Inherited from IGraph.)
Public methodGetEdge(String)
Gets the graph element for the given name.
Public methodGetElementName
Returns the name for the given element.
Public methodGetExactEdges
Enumerates all edges with the exact given edge type.
(Inherited from IGraph.)
Public methodGetExactNodes
Enumerates all nodes with the exact given node type.
(Inherited from IGraph.)
Public methodGetGraphElement(Int32)
Gets the graph element for the given unique id. Only available if the unique index was declared in the model.
(Inherited from IGraph.)
Public methodGetGraphElement(String)
Gets the graph element for the given name.
Public methodGetNode(Int32)
Gets the node for the given unique id. Only available if the unique index was declared in the model.
(Inherited from IGraph.)
Public methodGetNode(String)
Gets the node for the given name.
Public methodGetNumCompatibleEdges
Returns the number of edges compatible to the given edge type.
(Inherited from IGraph.)
Public methodGetNumCompatibleNodes
Returns the number of nodes compatible to the given node type.
(Inherited from IGraph.)
Public methodGetNumExactEdges
Returns the number of edges with the exact given edge type.
(Inherited from IGraph.)
Public methodGetNumExactNodes
Returns the number of nodes with the exact given node type.
(Inherited from IGraph.)
Public methodHasSameStructure(IGraph)
Returns whether this graph is isomorph to that graph, neglecting the attribute values, only structurally
(Inherited from IGraph.)
Public methodHasSameStructure(IDictionaryIGraph, SetValueType)
Returns whether this graph is isomorph to any of the set of graphs given, neglecting the attribute values, only structurally Don't call from a parallelized matcher!
(Inherited from IGraph.)
Public methodIsInternallyVisited(IGraphElement)
Returns whether the given graph element has been internally visited. (Used for computing reachability.)
(Inherited from IGraph.)
Public methodIsInternallyVisited(IGraphElement, Int32)
Returns whether the given graph element has been internally visited. (Used for computing reachability when employed from a parallelized matcher executed by the thread pool.)
(Inherited from IGraph.)
Public methodIsIsomorph(IGraph)
Returns whether this graph is isomorph to that graph (including the attribute values) If a graph changed only in attribute values since the last comparison, results will be wrong! (Do a fake node insert and removal to ensure the graph is recognized as having changed.)
(Inherited from IGraph.)
Public methodIsIsomorph(IDictionaryIGraph, SetValueType)
Returns whether this graph is isomorph to any of the set of graphs given (including the attribute values) If a graph changed only in attribute values since the last comparison, results will be wrong! (Do a fake node insert and removal to ensure the graph is recognized as having changed.) Don't call from a parallelized matcher!
(Inherited from IGraph.)
Public methodIsVisited
Returns whether the given graph element has been visited.
(Inherited from IGraph.)
Public methodMerge(INode, INode)
Merges the source node into the target node, i.e. all edges incident to the source node are redirected to the target node, then the source node is deleted.
Public methodMerge(INode, INode, String)
Merges the source node into the target node, i.e. all edges incident to the source node are redirected to the target node, then the source node is deleted.
(Inherited from IGraph.)
Public methodRedirectSource(IEdge, INode)
Changes the source node of the edge from the old source to the given new source.
Public methodRedirectSource(IEdge, INode, String)
Changes the source node of the edge from the old source to the given new source.
(Inherited from IGraph.)
Public methodRedirectSourceAndTarget(IEdge, INode, INode)
Changes the source of the edge from the old source to the given new source, and changes the target node of the edge from the old target to the given new target.
Public methodRedirectSourceAndTarget(IEdge, INode, INode, String, String)
Changes the source of the edge from the old source to the given new source, and changes the target node of the edge from the old target to the given new target.
(Inherited from IGraph.)
Public methodRedirectTarget(IEdge, INode)
Changes the target node of the edge from the old target to the given new target.
Public methodRedirectTarget(IEdge, INode, String)
Changes the target node of the edge from the old target to the given new target.
(Inherited from IGraph.)
Public methodRemove(IEdge)
Removes the given edge from the graph.
(Inherited from IGraph.)
Public methodRemove(INode)
Removes the given node from the graph. There must be no edges left incident to the node (you may use RemoveEdges to ensure this).
(Inherited from IGraph.)
Public methodRemoveEdges
Removes all edges from the given node.
(Inherited from IGraph.)
Public methodResetVisitedFlag
Resets the visited flag with the given ID on all graph elements, if necessary.
(Inherited from IGraph.)
Public methodRetype(IEdge, EdgeType)
Retypes an edge by creating a new edge of the given type. Source and target node as well as all attributes from common super classes are kept.
(Inherited from IGraph.)
Public methodRetype(INode, NodeType)
Retypes a node by creating a new node of the given type. All incident edges as well as all attributes from common super classes are kept.
(Inherited from IGraph.)
Public methodSetElementName
Sets the name for a graph element. Any previous name will be overwritten.
Public methodSetElementPrefixName
Sets a name of the form prefix + number for the graph element, with number being the first number from 0 on yielding an element name not already available in the graph
Public methodSetInternallyVisited(IGraphElement, Boolean)
Sets the internal-use visited flag of the given graph element. (Used for computing reachability.)
(Inherited from IGraph.)
Public methodSetInternallyVisited(IGraphElement, Boolean, Int32)
Sets the internal-use visited flag of the given graph element. (Used for computing reachability when employed from a parallelized matcher executed by the thread pool.)
(Inherited from IGraph.)
Public methodSetVisited
Sets the visited flag of the given graph element.
(Inherited from IGraph.)
Public methodValidate
Checks whether a graph meets the connection assertions.
(Inherited from IGraph.)
Top
Events
  NameDescription
Public eventOnChangedEdgeAttribute
Fired after an attribute of an edge is changed; for debugging purpose. Note for LGSPBackend: Because graph elements of the LGSPBackend don't know their graph a call to LGSPGraphElement.SetAttribute will not fire this event. If you use this function and want the event to be fired, you have to fire it yourself using ChangedEdgeAttributes.
(Inherited from IGraph.)
Public eventOnChangedNodeAttribute
Fired after an attribute of a node is changed; for debugging purpose. Note for LGSPBackend: Because graph elements of the LGSPBackend don't know their graph a call to LGSPGraphElement.SetAttribute will not fire this event. If you use this function and want the event to be fired, you have to fire it yourself using ChangedNodeAttributes.
(Inherited from IGraph.)
Public eventOnChangingEdgeAttribute
Fired before an attribute of an edge is changed. Note for LGSPBackend: Because graph elements of the LGSPBackend don't know their graph a call to LGSPGraphElement.SetAttribute will not fire this event. If you use this function and want the event to be fired, you have to fire it yourself using ChangingEdgeAttributes.
(Inherited from IGraph.)
Public eventOnChangingNodeAttribute
Fired before an attribute of a node is changed. Note for LGSPBackend: Because graph elements of the LGSPBackend don't know their graph a call to LGSPGraphElement.SetAttribute will not fire this event. If you use this function and want the event to be fired, you have to fire it yourself using ChangingNodeAttributes.
(Inherited from IGraph.)
Public eventOnClearingGraph
Fired before the whole graph is cleared
(Inherited from IGraph.)
Public eventOnEdgeAdded
Fired after an edge has been added
(Inherited from IGraph.)
Public eventOnNodeAdded
Fired after a node has been added
(Inherited from IGraph.)
Public eventOnRedirectingEdge
Fired before an edge is redirected (causing removal then adding again). The edge to be redirected is provided to the handler.
(Inherited from IGraph.)
Public eventOnRemovingEdge
Fired before an edge is deleted
(Inherited from IGraph.)
Public eventOnRemovingEdges
Fired before all edges of a node are deleted
(Inherited from IGraph.)
Public eventOnRemovingNode
Fired before a node is deleted
(Inherited from IGraph.)
Public eventOnRetypingEdge
Fired before the type of an edge is changed. Old and new edges are provided to the handler.
(Inherited from IGraph.)
Public eventOnRetypingNode
Fired before the type of a node is changed. Old and new nodes are provided to the handler.
(Inherited from IGraph.)
Public eventOnSettingAddedEdgeNames
Fired before each rewrite step (also rewrite steps of subpatterns) to indicate the names of the edges added in this rewrite step in order of addition.
(Inherited from IGraph.)
Public eventOnSettingAddedNodeNames
Fired before each rewrite step (also rewrite steps of subpatterns) to indicate the names of the nodes added in this rewrite step in order of addition.
(Inherited from IGraph.)
Public eventOnSettingVisited
Fired before a visited flag is set.
(Inherited from IGraph.)
Public eventOnVisitedAlloc
Fired after a visited flag was allocated.
(Inherited from IGraph.)
Public eventOnVisitedFree
Fired after a visited flag was freed.
(Inherited from IGraph.)
Top
See Also