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

Class implementing a non-multiedges graph.A non-multiedges graph does not allow multiple edges between the same source and target vertices. More...

Public Member Functions

 NMG (size_t sz)
 Create a non-multiedges graph with the specified number of vertices.
 
edge_descriptor add_edge (edge_descriptor const &ed)
 Adds the specified edge to the graph, if it doesn't already exist. More...
 
edge_descriptor add_edge (edge_descriptor const &ed, edge_property const &p)
 Adds the specified edge to the graph, if it doesn't already exist, with the given property. More...
 

Public Types

typedef base_type::edge_descriptor edge_descriptor
 
typedef base_type::edge_property edge_property
 

Detailed Description

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

Class implementing a non-multiedges graph.

A non-multiedges graph does not allow multiple edges between the same source and target vertices.

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

Member Function Documentation

◆ add_edge() [1/2]

template<class Traits >
edge_descriptor stapl::sequential::NMG< Traits >::add_edge ( edge_descriptor const &  ed)

Adds the specified edge to the graph, if it doesn't already exist.

Parameters
edThe 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/2]

template<class Traits >
edge_descriptor stapl::sequential::NMG< Traits >::add_edge ( edge_descriptor const &  ed,
edge_property const &  p 
)

Adds the specified edge to the graph, if it doesn't already exist, with the given property.

Parameters
edThe 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().

The documentation for this class was generated from the following file: