An adjacency list using an std::map for storing vertices. Used inside the adjacency_list_model to store vertices.
More...
|
| vdg_map_int (size_t nv=0) |
| Constructs a storage with the given number of vertices starting from zero (0). Vertices have contiguous descriptors. More...
|
|
| vdg_map_int (this_type const &other) |
|
void | resize (size_t nv) |
| Resize the internal storage to accommodate specified number of vertices.
|
|
iterator | begin (void) |
|
const_iterator | begin (void) const |
|
iterator | end (void) |
|
const_iterator | end (void) const |
|
size_t | size (void) const |
| Returns the number of vertices in the storage; for use in g.num_vertices().
|
|
vertex_descriptor | add_vertex (vertex_descriptor const &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 const &vd, vertex_property const &vp) |
| Adds vertex to the storage with the given descriptor and property. More...
|
|
bool | delete_vertex (vertex_descriptor const &, iterator const &vi) |
| Deletes the vertex pointed to by the specified iterator. More...
|
|
void | clear (void) |
| Clears the storage container of all vertices and edges, and resets the vertex descriptor generator.
|
|
iterator | find_vertex (vertex_descriptor const &vd) |
| Returns an iterator to the specified vertex, or returns an iterator to this->end() if the vertex does not exist.
|
|
void | update_descriptor (vertex_descriptor &vd, iterator const &vi) |
| Updates a versioning descriptor with the new iterator. Unused in this class.
|
|
vertex_descriptor | get_max_descriptor (void) const |
|
|
typedef Traits::vertex_descriptor | vertex_descriptor |
|
typedef Traits::vertex_property | vertex_property |
|
typedef Traits::edge_type | edge_type |
|
typedef adjacency_descriptor_impl< edge_type > | edgelist_type |
|
typedef select_vertex< vertex_descriptor, vertex_property, edgelist_type >::type | vertex_impl_type |
|
typedef vdg_base_int< vertex_descriptor > | vdg_type |
| Type of the vertex descriptor generator.
|
|
typedef std::map< vertex_descriptor, vertex_impl_type > | vertex_set_type |
| The vertices are stored in an std::map.
|
|
typedef std::pair< vertex_descriptor, vertex_impl_type > | iv_type |
| Internal value type of the std::map.
|
|
typedef mit_adaptor< typename vertex_set_type::iterator > | iterator |
|
typedef mit_adaptor< typename vertex_set_type::const_iterator > | const_iterator |
|
template<class Traits>
class stapl::sequential::vdg_map_int< Traits >
An adjacency list using an std::map for storing vertices. Used inside the adjacency_list_model to store vertices.
- Template Parameters
-
Traits | The traits class for specifying the types of descriptors, storages, edges and vertices. Contains the physical storage for the Graph, and provides functionality to Add/Delete/Find vertices, and Iterators to access the storage from outside. |
◆ vdg_map_int()
Constructs a storage with the given number of vertices starting from zero (0). Vertices have contiguous descriptors.
- Parameters
-
nv | The number of vertices to be initially stored. |
◆ add_vertex() [1/3]
Adds vertex to the storage with the given vertex descriptor.
- Parameters
-
vd | The descriptor of the added vertex. |
- Returns
- The descriptor of the added vertex.
◆ add_vertex() [2/3]
Adds vertex to the storage with the given vertex property. The descriptor is assigned automatically using the descriptor generator.
- Parameters
-
vp | The vertex property of the added vertex. |
- Returns
- The descriptor of the added vertex.
◆ add_vertex() [3/3]
Adds vertex to the storage with the given descriptor and property.
- Parameters
-
vd | The explicit descriptor of the added vertex. |
vp | The vertex property of the added vertex. |
- Returns
- The descriptor of the added vertex.
◆ delete_vertex()
Deletes the vertex pointed to by the specified iterator.
- Parameters
-
vi | The iterator of the vertex to be deleted. |
- Returns
- Whether or not the vertex was successfully deleted.
The documentation for this class was generated from the following file: