An adjacency list using an unordered map for storing vertices.Used inside the adjacency_list_model to store vertices. More...
Public Member Functions | |
| adjacency_list_hashmap_storage (size_t const &start_vd, size_t const &num_vds, vertex_impl_type const &default_value) | |
| Constructs a storage with the given number of vertices starting from the specified descriptor, with the given default value. Vertices have contiguous descriptors. More... | |
| adjacency_list_hashmap_storage (adjacency_list_hashmap_storage const &other) | |
| void | resize (size_t nv) |
| Resize the internal storage to accommodate more vertices. | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| size_t | size () const |
| Returns the size of storage; for use in g.num_vertices(). | |
| vertex_descriptor | add_vertex (vertex_descriptor &vd) |
| Adds vertex to the storage with the given vertex descriptor. More... | |
| vertex_descriptor | add_vertex (vertex_property const &vp) |
| Adds vertex to the storage with the given vertex property. The descriptor is assigned automatically using the descriptor generator. More... | |
| vertex_descriptor | add_vertex (vertex_descriptor vd, vertex_property const &vp) |
| Adds vertex to the storage with the given descriptor & property. More... | |
| void | update_next_descriptor (vertex_descriptor const &vd) |
| Updates the vertex descriptor generator with the next free descriptor. | |
| bool | delete_vertex (vertex_descriptor const &, iterator const &vi) |
| Deletes the vertex pointed to by the specified iterator. More... | |
| vertex_descriptor | next_free_descriptor () |
| void | clear (void) |
| Clears the storage container of all vertices and edges. | |
| void | clear_edges (void) |
| Clears the storage container of all edges. | |
| iterator | find_vertex (vertex_descriptor const &vd) |
| Returns an iterator to the specified vertex. | |
| void | update_descriptor (vertex_descriptor &vd, iterator const &vi) |
| Not used. Provided for compatibility. | |
| vertex_descriptor | get_max_descriptor () |
| Returns the current max descriptor. | |
Public Types | |
| typedef Traits::vertex_descriptor | vertex_descriptor |
| typedef Traits::vertex_property | vertex_property |
| typedef Traits::edge_type | edge_type |
| typedef Traits::edgelist_type | edgelist_type |
| typedef Traits::vertex_impl_type | vertex_impl_type |
| typedef vdg_strided< vertex_descriptor > | vdg_type |
| Type of the vertex descriptor generator. | |
| typedef stapl::hash_map< vertex_descriptor, vertex_impl_type > | vertex_set_type |
| The vertices are stored in a hash_map. | |
| typedef std::pair< vertex_descriptor, vertex_impl_type > | iv_type |
| Internal value type for the hash_map storage. | |
| typedef sequential::mit_adaptor< typename vertex_set_type::iterator > | iterator |
| typedef sequential::mit_adaptor< typename vertex_set_type::const_iterator > | const_iterator |
Protected Attributes | |
| vdg_type | m_vdg |
| The vertex descriptor generator. | |
| vertex_set_type | m_storage |
| The container for storing vertices. | |
An adjacency list using an unordered map for storing vertices.
Used inside the adjacency_list_model to store vertices.
| Traits | The traits class for specifying the types of descriptors, storages, edges and vertices, etc. |
| stapl::adjacency_list_hashmap_storage< Traits >::adjacency_list_hashmap_storage | ( | size_t const & | start_vd, |
| size_t const & | num_vds, | ||
| vertex_impl_type const & | default_value | ||
| ) |
Constructs a storage with the given number of vertices starting from the specified descriptor, with the given default value. Vertices have contiguous descriptors.
| start_vd | The starting descriptor of the vertices. |
| num_vds | The number of vertices to be initially stored. |
| default_value | The default value for the vertices. |
| vertex_descriptor stapl::adjacency_list_hashmap_storage< Traits >::add_vertex | ( | vertex_descriptor & | vd | ) |
Adds vertex to the storage with the given vertex descriptor.
| vd | The descriptor of the added vertex. |
| vertex_descriptor stapl::adjacency_list_hashmap_storage< Traits >::add_vertex | ( | vertex_property const & | vp | ) |
Adds vertex to the storage with the given vertex property. The descriptor is assigned automatically using the descriptor generator.
| vp | The vertex property of the added vertex. |
| vertex_descriptor stapl::adjacency_list_hashmap_storage< Traits >::add_vertex | ( | vertex_descriptor | vd, |
| vertex_property const & | vp | ||
| ) |
Adds vertex to the storage with the given descriptor & property.
| vd | The explicit descriptor of the added vertex. |
| vp | The vertex property of the added vertex. |
| bool stapl::adjacency_list_hashmap_storage< Traits >::delete_vertex | ( | vertex_descriptor const & | , |
| iterator const & | vi | ||
| ) |
Deletes the vertex pointed to by the specified iterator.
| vi | The iterator of the vertex to be deleted. |
1.8.13