|
| csr_vector_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...
|
|
| csr_vector_storage (csr_vector_storage const &other) |
|
void | resize (size_t nv) |
| Resize the internal storage to accommodate specified number of vertices.
|
|
iterator | begin () |
| Returns an iterator to the start of the vertices.
|
|
iterator | end () |
| Returns an iterator to the end of the vertices.
|
|
const_iterator | begin () const |
| Returns an iterator to the start of the vertices.
|
|
const_iterator | end () const |
| Returns an iterator to the end of the vertices.
|
|
edge_iterator | edges_begin () |
| Returns an edge_iterator to the start of the edges.
|
|
edge_iterator | edges_end () |
| Returns an edge_iterator to the end of the edges.
|
|
uncommitted_edge_iterator | uncommitted_edges_begin () |
| Returns an edge_iterator to the begin of the uncommitted edges.
|
|
uncommitted_edge_iterator | uncommitted_edges_end () |
| Returns an edge_iterator to the end of the uncommitted edges.
|
|
const_edge_iterator | edges_begin () const |
| Returns an edge_iterator to the start of the edges.
|
|
const_edge_iterator | edges_end () const |
| Returns an edge_iterator to the end of the edges.
|
|
size_t | size () const |
| Returns the number of vertices in the storage; for use in g.num_vertices().
|
|
void | add_edge (edge_descriptor_type const &ed, edge_property const &ep) |
| Adds an edge with given descriptor and default edge property. More...
|
|
void | add_edge (full_edge_type const &e) |
| Adds an edge from a full edge. More...
|
|
void | clear (void) |
| Erases all vertices and edges in the graph.
|
|
iterator | find_vertex (vertex_descriptor const &vd) |
| Finds the vertex with the specified descriptor, and returns an iterator pointing to it. If not found, the end of the graph is returned. More...
|
|
void | update_descriptor (vertex_descriptor const &, iterator const &) |
| Not used by CSR graph, provided for compatibility.
|
|
void | update_next_descriptor (vertex_descriptor const &vd) |
| Updates the vertex descriptor generator with the next free descriptor.
|
|
vertex_descriptor | get_max_descriptor () |
| Returns the current max descriptor.
|
|
std::pair< std::size_t, std::size_t > | commit () |
| Freezes the CSR graph so that no further addition of edges is possible. More...
|
|
void | uncommit () |
| Uncommit the CSR graph. More...
|
|
template<typename Comp > |
void | sort_edges (Comp &&cmp) |
| Sorts edges of each vertex by user-defined comparison function. More...
|
|
template<typename Pred > |
void | erase_edges_if (Pred &&pred) |
| Erases all edges that match a user-defined predicate. More...
|
|
void | remove_duplicate_edges () |
| Removes all duplicate edges with the same (source, target) pair. More...
|
|
|
typedef Traits::vertex_descriptor | vertex_descriptor |
|
using | edge_property = typename Traits::edge_property |
|
typedef Traits::vertex_property | vertex_property |
|
typedef Traits::full_edge_type | full_edge_type |
|
using | uncommitted_edgelist_type = csr_edgelist_impl< full_edge_type > |
|
using | uncommitted_edge_iterator = typename uncommitted_edgelist_type::iterator |
|
using | edge_type = typename Traits::edge_type |
|
using | edge_descriptor_type = typename edge_type::edge_descriptor_type |
|
using | vertex_impl_type = typename Traits::vertex_impl_type |
|
using | edgelist_type = typename Traits::edgelist_type |
|
typedef sequential::vdg_base_int< vertex_descriptor > | vdg_type |
| Type of the vertex descriptor generator.
|
|
typedef std::vector< vertex_impl_type > | vertex_set_type |
| The vertices are stored in an std::vector.
|
|
typedef vertex_set_type::iterator | iterator |
|
typedef vertex_set_type::const_iterator | const_iterator |
|
typedef edgelist_type::iterator | edge_iterator |
|
typedef edgelist_type::const_iterator | const_edge_iterator |
|
|
vdg_type | m_vdg |
| The vertex descriptor generator.
|
|
vertex_set_type | m_storage |
| The container for storing vertices.
|
|
uncommitted_edgelist_type | m_uncommitted_edges |
| The container for storing uncommitted edges.
|
|
edgelist_type | m_edgelist |
| The container for storing edges.
|
|
vertex_descriptor | my_local_start_vd |
| The descriptor of the starting vertex in this storage.
|
|
bool | m_committed |
| The flag indicates if the CSR is frozen. Edges may only be added to the CSR as long as it is unfrozen. Once it has been frozen by calling the commit() method, no further addition of edges is allowed. The CSR graph starts off in an unfrozen state, and may only be committed once, and may not be uncommitted thereafter.
|
|
size_t | m_ne |
| The number of edges in the graph.
|
|
size_t | m_se |
| The number of self edges in the graph.
|
|
template<class Traits>
class stapl::csr_vector_storage< Traits >
An CSR using an std::vector for storing vertices. Used inside the csr_model to store vertices.
- Template Parameters
-
Traits | The traits class for specifying the types of descriptors, storages, edges and vertices. |