STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::sequential::DG< Traits > Class Template Reference

Class implementing a directed graph. More...

Public Member Functions

 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...
 

Public Types

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
 

Detailed Description

template<class Traits>
class stapl::sequential::DG< Traits >

Class implementing a directed graph.

Template Parameters
TraitsA traits class that defines customizable components of graph, such as the descriptor, model, storage, etc.

Member Function Documentation

◆ 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
vdThe specified vertex.
succThe output list of the descriptors of the successors.
Returns
The number of successors.

◆ reverse_all_edges()

template<class Traits >
void stapl::sequential::DG< Traits >::reverse_all_edges ( void  )

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: