An adjacency list using an std::vector for storing vertices. Used inside the adjacency_list_model to store vertices.
More...
|
| vdg_storage_int (size_t nv=0) |
| Constructs a storage with the given number of vertices starting from zero (0). Vertices have contiguous descriptors. More...
|
|
| vdg_storage_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_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 |
| Returns the current max descriptor.
|
|
|
typedef Traits::vertex_descriptor | vertex_descriptor |
|
typedef Traits::vertex_property | vertex_property |
|
typedef vertex_set_type::iterator | iterator |
|
typedef vertex_set_type::const_iterator | const_iterator |
|
template<class Traits>
class stapl::sequential::vdg_storage_int< Traits >
An adjacency list using an std::vector 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_storage_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/2]
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() [2/2]
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: