Class implementing a directed graph.
More...
|
| DG (size_t sz) |
| Create a directed graph with the specified number of vertices.
|
|
bool | is_directed () const |
| Method used to check if the graph is directed or not. This class always returns true;.
|
|
size_t | get_out_degree (vertex_descriptor const &vd) |
| Returns the out degree of the specified vertex.
|
|
size_t | get_successors (vertex_descriptor &vd, std::vector< vertex_descriptor > &succ) const |
| Returns the number of successors of the specified vertex, and initializes the provided vector with their corresponding descriptors. More...
|
|
void | reverse_all_edges (void) |
| Reverse all edges in the directed graph. More...
|
|
|
typedef base_type::vertex_descriptor | vertex_descriptor |
|
typedef base_type::edge_descriptor | edge_descriptor |
|
typedef base_type::vertex_iterator | vertex_iterator |
|
typedef base_type::const_vertex_iterator | const_vertex_iterator |
|
typedef base_type::adj_edge_iterator | adj_edge_iterator |
|
typedef base_type::const_adj_edge_iterator | const_adj_edge_iterator |
|
template<class Traits>
class stapl::sequential::DG< Traits >
Class implementing a directed graph.
- Template Parameters
-
Traits | A traits class that defines customizable components of graph, such as the descriptor, model, storage, etc. |
◆ get_successors()
template<class Traits >
size_t stapl::sequential::DG< Traits >::get_successors |
( |
vertex_descriptor & |
vd, |
|
|
std::vector< vertex_descriptor > & |
succ |
|
) |
| const |
Returns the number of successors of the specified vertex, and initializes the provided vector with their corresponding descriptors.
- Parameters
-
vd | The specified vertex. |
succ | The output list of the descriptors of the successors. |
- Returns
- The number of successors.
◆ reverse_all_edges()
Reverse all edges in the directed graph.
- Note
- Uses O(E) extra storage, O(E) time.
The documentation for this class was generated from the following file: