|
Flow123d
JS_before_hm-1575-ga41e096
|
#include <dfs_topo_sort.hh>

Public Member Functions | |
| DfsTopoSort (unsigned int nv) | |
| Constructor. More... | |
| ~DfsTopoSort () | |
| Destructor. More... | |
| void | clear () |
| Clear content of adjacency lists. More... | |
| void | add_edge (unsigned int v, unsigned int w) |
| vector< unsigned int > | topological_sort () |
Private Member Functions | |
| void | topological_sort_util (unsigned int v, bool visited[], stack< unsigned int > &stc) |
| A function used by topological_sort. More... | |
Private Attributes | |
| unsigned int | nv_ |
| Number of vertices. More... | |
| list< unsigned int > * | adj_ |
| Pointer to an array containing adjacency lists. More... | |
Class to represent a graph and allows to perform sorting.
DFS topological sorting is used.
Definition at line 32 of file dfs_topo_sort.hh.
|
inline |
Constructor.
Definition at line 45 of file dfs_topo_sort.hh.
|
inline |
Destructor.
Definition at line 52 of file dfs_topo_sort.hh.
|
inline |
Add an edge to graph
Vertex 'w' is descendant of 'v'
Definition at line 69 of file dfs_topo_sort.hh.
|
inline |
Clear content of adjacency lists.
Definition at line 58 of file dfs_topo_sort.hh.
| vector< unsigned int > DfsTopoSort::topological_sort | ( | ) |
Makes a DFS Topological Sort of the complete graph and returns result vector of sorting algorithm.
Definition at line 103 of file dfs_topo_sort.hh.
|
private |
A function used by topological_sort.
Definition at line 83 of file dfs_topo_sort.hh.
|
private |
Pointer to an array containing adjacency lists.
Definition at line 37 of file dfs_topo_sort.hh.
|
private |
Number of vertices.
Definition at line 34 of file dfs_topo_sort.hh.
1.8.11