STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Member Functions | Protected Attributes | Friends
stapl::unordered_map_adjacency_list_impl< Edge > Class Template Reference

Adjacency list of a vertex implemented as an unordered map of edges.Used inside the vertex_adj_list_impl to store adjacent edges. More...

Public Member Functions

 unordered_map_adjacency_list_impl (size_t n=0)
 Create an edgelist with specified number of edges.
 
 unordered_map_adjacency_list_impl (unordered_map_adjacency_list_impl const &other)
 
unordered_map_adjacency_list_imploperator= (unordered_map_adjacency_list_impl const &other)
 
iterator begin (void)
 
const_iterator begin (void) const
 
iterator end (void)
 
const_iterator end (void) const
 
iterator remote_begin (void)
 Not used, provided for compatibility.
 
const_iterator remote_begin (void) const
 Not used, provided for compatibility.
 
iterator find (vertex_descriptor const &vd)
 Returns an iterator to the edge with the specified target. More...
 
iterator find (edge_descriptor const &ed)
 Returns an iterator to the specified edge. More...
 
const_iterator find (vertex_descriptor const &vd) const
 Returns an iterator to the edge with the specified target. More...
 
const_iterator find (edge_descriptor const &ed) const
 Returns an iterator to the specified edge. More...
 
size_t size (void) const
 Returns the number of edges in the edgelist.
 
size_t capacity (void) const
 Returns the storage capacity of the edgelist.
 
void reserve (size_t n)
 Not used, provided for compatibility.
 
void clear (void)
 Clears the edgelist.
 
void erase (size_t n)
 Erases all edges from index n until the end. More...
 

Public Types

typedef Edge edge_type
 
typedef Edge::vertex_descriptor vertex_descriptor
 
typedef Edge::edge_descriptor_type edge_descriptor
 
typedef boost::unordered_map< vertex_descriptor, edge_type > storage_type
 
typedef boost::transform_iterator< select_2nd< edge_type >, typename storage_type::iterator > iterator
 
typedef boost::transform_iterator< select_2nd< edge_type >, typename storage_type::const_iterator > const_iterator
 
typedef std::iterator_traits< iterator >::reference reference
 
typedef std::iterator_traits< iterator >::value_type value_type
 

Protected Member Functions

void add (const Edge &ed)
 Adds the specified edge to the front of edgelist. This interface is specific to adjacency list and is accessible only from adjacency_list_graph, as we need to make sure the edge's source is the correct vertex. More...
 
void erase (iterator it)
 Erases the edge pointed to by the specified iterator. More...
 

Protected Attributes

storage_type m_data
 Data: Stores the list of edges.
 

Friends

template<class Traits >
class adjacency_list_model
 

Detailed Description

template<class Edge>
class stapl::unordered_map_adjacency_list_impl< Edge >

Adjacency list of a vertex implemented as an unordered map of edges.

Used inside the vertex_adj_list_impl to store adjacent edges.

Template Parameters
EdgeThe type of edge to be stored.

Member Function Documentation

◆ find() [1/4]

template<class Edge >
iterator stapl::unordered_map_adjacency_list_impl< Edge >::find ( vertex_descriptor const &  vd)

Returns an iterator to the edge with the specified target.

Parameters
vdThe descriptor of the target vertex.

◆ find() [2/4]

template<class Edge >
iterator stapl::unordered_map_adjacency_list_impl< Edge >::find ( edge_descriptor const &  ed)

Returns an iterator to the specified edge.

Parameters
edThe descriptor of the edge.

◆ find() [3/4]

template<class Edge >
const_iterator stapl::unordered_map_adjacency_list_impl< Edge >::find ( vertex_descriptor const &  vd) const

Returns an iterator to the edge with the specified target.

Parameters
vdThe descriptor of the target vertex.

◆ find() [4/4]

template<class Edge >
const_iterator stapl::unordered_map_adjacency_list_impl< Edge >::find ( edge_descriptor const &  ed) const

Returns an iterator to the specified edge.

Parameters
edThe descriptor of the edge.

◆ erase() [1/2]

template<class Edge >
void stapl::unordered_map_adjacency_list_impl< Edge >::erase ( size_t  n)

Erases all edges from index n until the end.

Parameters
nThe starting index of the range of edges to be deleted.

◆ add()

template<class Edge >
void stapl::unordered_map_adjacency_list_impl< Edge >::add ( const Edge &  ed)
protected

Adds the specified edge to the front of edgelist. This interface is specific to adjacency list and is accessible only from adjacency_list_graph, as we need to make sure the edge's source is the correct vertex.

Parameters
edThe edge to be inserted into the edgelist.

◆ erase() [2/2]

template<class Edge >
void stapl::unordered_map_adjacency_list_impl< Edge >::erase ( iterator  it)
protected

Erases the edge pointed to by the specified iterator.

Parameters
itAn iterator pointing to the edge to be deleted.

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