|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
Use GraphTC for all new code.
The class GraphC represents reference counted graph
which can be directed or undirected. It contains a collection
of nodes and a collection of edges between nodes.
Parent Classes:
Derived Classes:
Variables:
- BaseGraphC * graph;
-
Methods:
- GraphC(BaseGraphC::TypeT type = BaseGraphC::DIRECTED)
-
Creates an empty graph, directed or undirected.
- GraphC(const GraphC & g)
-
Creates another access to the graph 'g'. The constructor does not
change the content of the graph 'g', but its reference counting.
However, the content of the graph 'g' can be changed through
the this new access later.
- const GraphC & operator=(const GraphC & g)
-
- ~GraphC()
-
Destructor.
Creation of the structure of the graph.
---------------------------------------
- GraphNodeC InsNode()
-
Inserts one node to the graph. Returns the node iterator.
- GraphEdgeC InsEdge(GraphNodeC & fromNode,GraphNodeC & toNode)
-
Inserts one egde to the graph. Returns the edge iterator.
Access to the parts of the graph
--------------------------------
- BaseGraphC::TypeT Type() const
-
Returns the type of the graph, if it is directed or undirected.
- operator BaseGraphC &()
-
Returns the reference to the graph structure which is not reference
counted.
- operator const BaseGraphC &() const
-
Returns the constant reference to the graph structure
which is not reference counted.
- BaseGraphC & BaseGraph()
-
Returns the reference to the graph structure which is not reference
counted.
- const BaseGraphC & BaseGraph() const
-
Returns the reference to the graph structure which is not reference
counted.
- const IntrDListC<GraphNodeRepC> & Nodes() const
-
Returns the constant list of nodes.
- IntrDListC<GraphNodeRepC> & Nodes()
-
Returns the list of nodes.
- const IntrDListC<GraphEdgeRepC> & Edges() const
-
Returns the constant list of edges.
- IntrDListC<GraphEdgeRepC> & Edges()
-
Returns the list of edges.
- BooleanT IsCyclic()
-
Test if a directed graph contains cycles.
Functions changing the state of markers.
----------------------------------------
- void ResetNodeMarkers()
-
Sets all node markers to be 0.
- void ResetEdgeMarkers()
-
Sets all egde markers to be 0.
- void ResetMarkers()
-
Sets all node and edge markers to be 0.
- void SetNodeMarkersInOrder()
-
Sets all node markers as indexes in the list of nodes.
The first node in the list of nodes has index 0.
- void SetEdgeMarkersInOrder()
-
Sets all edge markers as indexes in the list of edges.
The first edge in the list of edges has index 0.
- void SetMarkersInOrder()
-
Sets all edge and node markers as indexes in the list of edges
and in the list of node respectively.
The first edge in the list of edges and the first node
in the list of nodes have indexes equal to 0.
Saving information about the graph.
-----------------------------------
- void PrintNodes(ostream & s) const
-
Prints all nodes of this graph into the output stream.
- void PrintEdges(ostream & s) const
-
Prints all edges of this graph into the output stream.
- void Print(ostream & s)
-
Sets marker of edges and nodes to be unique and print
the whole structure of this graph.
- void DebugPrint(ostream & s) const
-
Prints markers and addresses of all nodes and edges
of this graph.
- GraphNodeC InsNode(GraphNodeRepC::GenClassT nodeAttr)
-
Inserts one node to the graph. Returns the node iterator.
- GraphEdgeC InsEdge(GraphNodeC & fromNode,GraphNodeC & toNode,GraphEdgeRepC::GenClassT edgeAttr)
-
Inserts one edge to the graph. Returns the edge iterator.
- GraphNodeC InsNode(GraphNodeRepC & ANode)
-
Inserts one node to the graph. Returns the node iterator.
ANode must be a GraphNodeRepC that's just been created,
and not a part of another graph.
- GraphEdgeC InsEdge(GraphEdgeRepC & AnEdge)
-
Inserts one edge to the graph. Returns the edge iterator.
AnEdge must be a GraphEdgeRepC that's just been created,
and not a part of another graph.
- ostream & operator<<(ostream & s,const GraphC & g)
-
- BooleanT ToBeDeleted() const
-
Returns TRUE if the content should be deleted.
- RCCountT Count() const
-
Returns the number of refrences to this object.
NB. The following definition is now obsolete,
The value 0 means there is no other reference to this object.
- BooleanT IsSingleReference()
-
Tests is there is only one reference to this object.
- const RefCounterC & operator=(const RefCounterC & rC)
-
- BooleanT ToBeDeletedUpdate(const RefCounterC & rC)
-
This function is the condition and the assigment together.
It returns TRUE if the content should be deleted before
assigning of the new object. The function automatically solves
the reference counter of this object as well as the other object
reference counter 'rC'.
- void ReportInvalidObject(char * Msg = 0)
-
This function reports an error to the user if a problem is detected
in the refrence counting mechanism.
- LabelT Label() const
-
Returns the label of this reference counter.
The member function
is useful mainly to recognize objects during debugging.
The value of the label is uniquely defined pointer.
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|