class NstGraph

Directed graph

Inheritance:


Public Fields

[more]NstEdgeList edges
List of edges.
[more]NstVertexList vertices
List of vertices.

Public Methods

[more] NstGraph()
Creates an empty graph.
[more] NstGraph(const NstEdgeList &new_edges, const NstVertexList &new_vertices)
Creates a graph from a given edge list and a given vertex list.
[more]virtual ~NstGraph()
Deletes the graph.
[more]void copy(const NstGraph& s, int deep = 0)
Copy the graph
[more]NstGraph* clone(int deep = 0)
Clones the graph
[more]void output_vcg(ostream &s)
Output method in vcg format.
[more]void exec_vcg()
Execution of vcg to display the graph
[more]void system_vcg()
Execution of vcg by a system call and storing file to /tmp to display the graph
[more]NstGraph* merge_color() const
Fuses all vertices with the same color
[more]NstGraphList* graph_color()
Returns a list of graphs, each graph corresponds to the subgraph generated by all vertices with the same color
[more]int topological_sort()
Topological sort
[more]int graph_scc() const
Computes strongly connected components
[more]int graph_cc() const
Computes connected components


Documentation

Directed graph. A directed graph is represented by a list of vertices (see the classes NstVertex and NstVertexList) and a list of directed edges (see the classes NstEdge and NstEdgeList).
oNstEdgeList edges
List of edges.

oNstVertexList vertices
List of vertices.

o NstGraph()
Creates an empty graph.

o NstGraph(const NstEdgeList &new_edges, const NstVertexList &new_vertices)
Creates a graph from a given edge list and a given vertex list.

ovirtual ~NstGraph()
Deletes the graph.

ovoid copy(const NstGraph& s, int deep = 0)
Copy the graph. @param deep simple cloning if deep = 0, (one level) duplication otherwise. Just after the call, the order in the vertex list and in the edge list is the same in the original graph and in the copy.

oNstGraph* clone(int deep = 0)
Clones the graph. @param deep simple cloning if deep = 0, (one level) duplication otherwise. Just after the call, the order in the vertex list and in the edge list is the same in the original graph and in the clone.

ovoid output_vcg(ostream &s)
Output method in vcg format.

ovoid exec_vcg()
Execution of vcg to display the graph

ovoid system_vcg()
Execution of vcg by a system call and storing file to /tmp to display the graph

oNstGraph* merge_color() const
Fuses all vertices with the same color. All vertices with the same color are merged into a vertex set. The method returns a graph whose vertices are these sets. There is an edge between two sets if there is an edge in the original graph from a vertex of the first set to a vertex of the second set.

oNstGraphList* graph_color()
Returns a list of graphs, each graph corresponds to the subgraph generated by all vertices with the same color.

oint topological_sort()
Topological sort. Sorts the list of vertices so that each predecessor of a given vertex appears before in the list. Returns -1 if the graph has a cycle which is not a self-loop. WARNING: modify the tag[0].

oint graph_scc() const
Computes strongly connected components. The result is that two vertices have the same color if and only if they belong to the same strongly connected component. The returned value is the number of such components.

oint graph_cc() const
Computes connected components. The result is that two vertices have the same color if and only if they belong to the same connected component. The returned value is the number of such components.


Direct child classes:
NstRDGVar
NstRDGStat

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.