The STAPL sequential graph class.Inherits from a number of classes as specified in the traits class.
More...
|
| graph (size_t sz=0) |
| Create a graph with the specified number of vertices.
|
|
edge_descriptor | add_edge (edge_descriptor const &ed) |
| Adds the specified edge to the graph. More...
|
|
edge_descriptor | add_edge (edge_descriptor const &ed, edge_property const &p) |
| Adds the specified edge with the given property to the graph. More...
|
|
edge_descriptor | add_edge (vertex_descriptor const &source, vertex_descriptor const &target) |
| Adds the edge with the specified source and target, with a default property to the graph. More...
|
|
edge_descriptor | add_edge (vertex_descriptor const &source, vertex_descriptor const &target, edge_property const &p) |
| Adds the edge with the specified source and target, with the given property to the graph. More...
|
|
bool | delete_edge (edge_descriptor const &ed) |
| Deletes the specified edge. More...
|
|
bool | delete_edge (vertex_descriptor const &source, vertex_descriptor const &target) |
| Deletes an edge between the specified source and target vertices. More...
|
|
bool | is_edge (vertex_descriptor const &source, vertex_descriptor const &target) const |
| Checks if an edge exists between specified source and destination vertices.
|
|
size_t | get_degree (vertex_descriptor const &vd) const |
| Returns the number of adjacent edges (out_degree) of the specified vertex.
|
|
size_t | get_adjacent_vertices (vertex_descriptor const &vd, std::vector< vertex_descriptor > &adj) const |
| Returns the list and number of adjacents of the specified vertex,. More...
|
|
|
typedef VertexP | vertex_property |
|
typedef EdgeP | edge_property |
|
typedef core_base_type::vertex_descriptor | vertex_descriptor |
|
typedef core_base_type::edge_descriptor | edge_descriptor |
|
typedef core_base_type::vertex_iterator | vertex_iterator |
|
typedef core_base_type::const_vertex_iterator | const_vertex_iterator |
|
typedef core_base_type::adj_edge_iterator | adj_edge_iterator |
|
typedef core_base_type::const_adj_edge_iterator | const_adj_edge_iterator |
|
typedef core_base_type::edge_iterator | edge_iterator |
|
typedef core_base_type::const_edge_iterator | const_edge_iterator |
|
typedef vertex_iterator::value_type | vertex_reference |
|
typedef const_vertex_iterator::value_type | const_vertex_reference |
|
typedef vertex_iterator::value_type | reference |
|
typedef const_vertex_iterator::value_type | const_reference |
|
typedef edge_iterator::value_type | edge_reference |
|
typedef const_edge_iterator::value_type | const_edge_reference |
|
typedef adj_edge_iterator::value_type | adj_edge_reference |
|
typedef const_adj_edge_iterator::value_type | const_adj_edge_reference |
|
template<graph_attributes D, graph_attributes M, class VertexP = properties::no_property, class EdgeP = properties::no_property, class Traits = adj_graph_traits<D, M, VertexP, EdgeP>>
class stapl::sequential::graph< D, M, VertexP, EdgeP, Traits >
The STAPL sequential graph class.
Inherits from a number of classes as specified in the traits class.
- Template Parameters
-
D | graph-attribute specifying Directedness (DIRECTED/UNDIRECTED). |
M | graph-attribute specifying Multiedge. (MULTIEDGES/NONMULTIEDGES). |
VertexP | type of property for the vertex. Default is no_property. Must be default assignable, copyable and assignable. |
EdgeP | type of property for the edge. Default is no_property. Must be default assignable, copyable and assignable. |
Traits | A traits class that defines customizable components of graph, such as the descriptor, model, storage, etc. The default traits class is adj_graph_traits. |
◆ add_edge() [1/4]
template<graph_attributes D, graph_attributes M, class VertexP = properties::no_property, class EdgeP = properties::no_property, class Traits = adj_graph_traits<D, M, VertexP, EdgeP>>
Adds the specified edge to the graph.
- Parameters
-
ed | The descriptor of the edge to be added. |
- Returns
- The edge descriptor of the added edge. If successful, the id() of the descriptor is populated with the actual edge's id, otherwise set to std::numeric_limits<size_t>::max().
◆ add_edge() [2/4]
template<graph_attributes D, graph_attributes M, class VertexP = properties::no_property, class EdgeP = properties::no_property, class Traits = adj_graph_traits<D, M, VertexP, EdgeP>>
edge_descriptor stapl::sequential::graph< D, M, VertexP, EdgeP, Traits >::add_edge |
( |
edge_descriptor const & |
ed, |
|
|
edge_property const & |
p |
|
) |
| |
Adds the specified edge with the given property to the graph.
- Parameters
-
ed | The descriptor of the edge to be added. |
p | The edge property. |
- Returns
- The edge descriptor of the added edge. If successful, the id() of the descriptor is populated with the actual edge's id, otherwise set to std::numeric_limits<size_t>::max().
◆ add_edge() [3/4]
template<graph_attributes D, graph_attributes M, class VertexP = properties::no_property, class EdgeP = properties::no_property, class Traits = adj_graph_traits<D, M, VertexP, EdgeP>>
edge_descriptor stapl::sequential::graph< D, M, VertexP, EdgeP, Traits >::add_edge |
( |
vertex_descriptor const & |
source, |
|
|
vertex_descriptor const & |
target |
|
) |
| |
Adds the edge with the specified source and target, with a default property to the graph.
- Parameters
-
source | The vertex descriptor of the source of the edge to be added. |
target | The vertex descriptor of the target of the edge to be added. |
- Returns
- The edge descriptor of the added edge. If successful, the id() of the descriptor is populated with the actual edge's id, otherwise set to std::numeric_limits<size_t>::max().
◆ add_edge() [4/4]
template<graph_attributes D, graph_attributes M, class VertexP = properties::no_property, class EdgeP = properties::no_property, class Traits = adj_graph_traits<D, M, VertexP, EdgeP>>
edge_descriptor stapl::sequential::graph< D, M, VertexP, EdgeP, Traits >::add_edge |
( |
vertex_descriptor const & |
source, |
|
|
vertex_descriptor const & |
target, |
|
|
edge_property const & |
p |
|
) |
| |
Adds the edge with the specified source and target, with the given property to the graph.
- Parameters
-
source | The vertex descriptor of the source of the edge to be added. |
target | The vertex descriptor of the target of the edge to be added. |
p | The edge property. |
- Returns
- The edge descriptor of the added edge. If successful, the id() of the descriptor is populated with the actual edge's id, otherwise set to std::numeric_limits<size_t>::max().
◆ delete_edge() [1/2]
template<graph_attributes D, graph_attributes M, class VertexP = properties::no_property, class EdgeP = properties::no_property, class Traits = adj_graph_traits<D, M, VertexP, EdgeP>>
Deletes the specified edge.
- Returns
- True if the delete was successful, or false otherwise.
◆ delete_edge() [2/2]
template<graph_attributes D, graph_attributes M, class VertexP = properties::no_property, class EdgeP = properties::no_property, class Traits = adj_graph_traits<D, M, VertexP, EdgeP>>
bool stapl::sequential::graph< D, M, VertexP, EdgeP, Traits >::delete_edge |
( |
vertex_descriptor const & |
source, |
|
|
vertex_descriptor const & |
target |
|
) |
| |
Deletes an edge between the specified source and target vertices.
- Returns
- True if the delete was successful, or false otherwise.
◆ get_adjacent_vertices()
template<graph_attributes D, graph_attributes M, class VertexP = properties::no_property, class EdgeP = properties::no_property, class Traits = adj_graph_traits<D, M, VertexP, EdgeP>>
size_t stapl::sequential::graph< D, M, VertexP, EdgeP, Traits >::get_adjacent_vertices |
( |
vertex_descriptor const & |
vd, |
|
|
std::vector< vertex_descriptor > & |
adj |
|
) |
| const |
Returns the list and number of adjacents of the specified vertex,.
- Parameters
-
vd | The specified vertex. |
adj | The output vector of the descriptors of the adjacent vertices. |
- Returns
- The number of adjacent edges (out_degree) of the specified vertex.
The documentation for this class was generated from the following file: