mCRL2
|
Functions to analyze vertex order in a static graph. More...
Go to the source code of this file.
Functions | |
void | get_bfs_order (const StaticGraph &graph, std::vector< verti > &perm) |
void | get_dfs_order (const StaticGraph &graph, std::vector< verti > &perm) |
edgei | count_ordered_edges (const StaticGraph &g, int dir) |
edgei | count_forward_edges (const StaticGraph &g) |
edgei | count_backward_edges (const StaticGraph &g) |
edgei | counts_self_edges (const StaticGraph &g) |
Functions to analyze vertex order in a static graph.
This file declares functions that are useful to determine the ordering of vertices in a graph, and find ways to reorder them (for example, to obtain mostly forward-oriented edges).
Definition in file GraphOrdering.h.
|
inline |
Returns the number of edges (i,j) such that i > j
Definition at line 45 of file GraphOrdering.h.
|
inline |
Returns the number of edges (i,j) such that i < j
Definition at line 40 of file GraphOrdering.h.
edgei count_ordered_edges | ( | const StaticGraph & | g, |
int | dir | ||
) |
Count the number of edges with a specific ordering of vertices. An edge (i,j) is counted if sign(j - i) == sign(dir).
Definition at line 15 of file GraphOrdering.cpp.
|
inline |
Returns the number of edges (i,j) such that i = j
Definition at line 50 of file GraphOrdering.h.
void get_bfs_order | ( | const StaticGraph & | graph, |
std::vector< verti > & | perm | ||
) |
Traverses the graph in breadth-first search order, and returns the result in perm
, such that perm[v] = i if v is the i-th visited vertex.
Definition at line 30 of file GraphOrdering.cpp.
void get_dfs_order | ( | const StaticGraph & | graph, |
std::vector< verti > & | perm | ||
) |
Traverses the graph in depth-first search order, and returns the result in perm
, such that perm[v] = i if v is the i-th visited vertex.
Definition at line 60 of file GraphOrdering.cpp.