Class for Non-Multiedged graph's base-container. Derives from the graph_base_container_base class and overloads add_edge method for checking multiple edges. More...
Public Member Functions | |
| template<typename Domain > | |
| graph_base_container_NME (Domain const &domain, cid_type const &cid) | |
| Creates a graph base container with a given size and domain. More... | |
| template<typename Domain > | |
| graph_base_container_NME (Domain const &domain, cid_type const &cid, value_type const &default_value) | |
| Creates a graph base container with a given size and domain and constructs all elements with a default value for vertex. More... | |
| graph_base_container_NME (graph_base_container_NME const &other) | |
| edge_descriptor | add_edge (edge_descriptor const &edd, edge_property const &ep) |
| Adds an edge to this base-container with the given edge descriptor and edge property only if an edge with the same descriptor does not exist. More... | |
| edge_descriptor | add_edge (edge_descriptor const &edd, edge_property const &ep, bool bidir) |
| Adds an edge to this base-container with the given edge descriptor and edge property. If bidir is true, also adds the sibling edge, if the target also exists in this base-container. The edges are added only if an edge with the same descriptor does not exist. More... | |
| container_type * | data () |
| vertex_descriptor | next_free_descriptor () |
| vertex_iterator | begin (void) |
| vertex_iterator | end (void) |
| gid_type | index_of (iterator iter) |
| Redirect index_of requests to global freestanding function, as this base container wraps iterators and references instead of passing that of underlying container. | |
| edge_iterator | edges_begin (void) |
| edge_iterator | edges_end (void) |
| vertex_descriptor | add_vertex (vertex_property const &v) |
| Adds vertex to the component with the given vertex property. The descriptor is assigned automatically. More... | |
| vertex_descriptor | add_vertex (vertex_descriptor const &gid, vertex_property const &v) |
| Adds vertex to the component with the given descriptor and property. More... | |
| void | update_next_descriptor (vertex_descriptor const &vd) |
| Updates the vertex descriptor generator with the next free descriptor. | |
| vertex_descriptor | add_element (vertex_type const &v) |
| Adds vertex to the component with the given descriptor, property and edges. More... | |
| void | reserve_adjacency (vertex_descriptor const &gid, size_t num_adjacents) |
| Reserves space for adjacent edges of the vertex with the specified descriptor. More... | |
| bool | delete_vertex (vertex_descriptor gid) |
| Deletes the vertex with the specified descriptor. More... | |
| bool | suspend_vertex (vertex_descriptor gid) |
| Deletes the vertex associated with the specified descriptor, but leave all the edges pointing to it from other vertices. Needed for migration. More... | |
| vertex_iterator | find_vertex (vertex_descriptor const &gid) |
| Checks if the vertex with the specified descriptor is local to the component, then returns an iterator pointing to it. More... | |
| const_vertex_iterator | find_vertex (vertex_descriptor const &gid) const |
| vertex_iterator | find (vertex_descriptor const &gid) |
| Same as find_vertex(vertex_descriptor const&). Provided for compatibility with other base containers. | |
| edge_descriptor | add_edge (vertex_descriptor const &source, vertex_descriptor const &target, edge_property const &ep) |
| Adds an edge to this base-container from given source to target and edge property. More... | |
| edge_descriptor | insert_edge (edge_descriptor const &edd, edge_property const &ep, Comp const &comp) |
| Inserts an edge into this base-container with the given edge descriptor and edge property, using a comparator function to determine where in edge-container of a vertex the edge will be inserted. (Requires the edges of the source vertex to already be sorted by the comparator.) More... | |
| edge_descriptor | insert_edge (vertex_descriptor const &source, vertex_descriptor const &target, edge_property const &ep, Comp const &comp) |
| Inserts an edge into this base-container from given source to target descriptor and edge property, using a comparator function to determine where in edge-container of a vertex the edge will be inserted. (Requires the edges of the source vertex to already be sorted by the comparator.) More... | |
| void | insert_edge_async (edge_descriptor const &edd, edge_property const &ep, Comp const &comp) |
| void | insert_edge_async (vertex_descriptor const &source, vertex_descriptor const &target, edge_property const &ep, Comp const &comp) |
| edge_descriptor | add_edge_async (edge_descriptor const &edd, edge_property const &ep) |
| edge_descriptor | add_edge_async (vertex_descriptor const &source, vertex_descriptor const &target, edge_property const &ep) |
| bool | delete_edge (edge_descriptor const &ed) |
| Deletes an edge from this base-container with the given descriptor. More... | |
| bool | find_edge (edge_descriptor const &ed, vertex_iterator lit, adj_edge_iterator ei) |
| Finds the edge with the given edge descriptor. More... | |
| bool | has_edge (vertex_descriptor const &source, vertex_descriptor const &target) |
| Determines if an edge exists between two vertices. This method is similar to find_edge, but does not assign iterators. | |
| size_t | num_vertices (void) const |
| The number of vertices in this base-container. More... | |
| size_t | size (void) const |
| The number of vertices in this base-container. Same as num_vertices(), provided for compatibility. More... | |
| bool | empty (void) const |
| Tests if the base-container is empty or not. More... | |
| void | clear (void) |
| Deletes all vertices and edges in this base-container. | |
| void | clear_edges (void) |
| Deletes all edges in the base-container. | |
| void | sort_edges (Comp const &comp) |
| Sorts edges of each vertex based on given comparator. More... | |
| 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. | |
| size_t | num_edges (void) const |
| The number of edges in this base-container. | |
| size_t | num_self_edges (void) const |
| Returns the number of self edges in the base-container managed. | |
| edge_descriptor | add_bidirectional_edge (edge_descriptor const &ed, edge_property const &p) |
| Adds a bidirectional edge to the base-container with the given descriptor and property. The sibling edge has the source and target reversed. Both vertices should be in this base-container. More... | |
| void | apply (vertex_descriptor const &gid, F const &f, Distribution *distribution) |
| Applies a functor f on the specified vertex and passes a pointer to the graph distribution. More... | |
| void | apply_set (vertex_descriptor const &gid, F const &f) |
| applies a functor f on the specified vertex. More... | |
| F::result_type | apply_get (vertex_descriptor const &gid, F const &f) |
| applies a functor f on the specified vertex and returns a value. More... | |
| F::result_type | apply_get (vertex_descriptor const &gid, F const &f) const |
| applies a functor f on the specified vertex and returns a value. More... | |
| F::result_type | vp_apply (vertex_descriptor const &gid, F const &f) |
| Applies a functor f on the property of the specified vertex. More... | |
| F::result_type | vp_apply (vertex_descriptor const &gid, F const &f) const |
| Applies a functor f on the property of the specified vertex. More... | |
| void | vp_set (vertex_descriptor const &gid, typename Traits::stored_type const &vp) |
| Sets the property of the specified vertex to the given value. More... | |
| void | vp_apply_async (vertex_descriptor const &gid, F const &f) |
| Applies a functor f on the property of the specified vertex. More... | |
| void | aggregate_vp_apply (FCont const &fcont) |
| Applies each element from the given container of functors on the property of the vertex specified by each element. More... | |
| bool | ep_find_apply (edge_descriptor const &ed, F const &f) |
| Applies a functor f on the property of the specified edge, if it exists. More... | |
| void | ep_apply (edge_descriptor const &ed, F const &f) |
| Applies a functor f on the property of the specified edge. More... | |
| F::result_type | ep_apply_get (edge_descriptor const &ed, F const &f) |
| Applies a functor f on the property of the specified edge, and returns the result. More... | |
| vertex_reference | operator[] (gid_type const &g) |
| Returns a reference to the specified vertex. More... | |
| const_vertex_reference | operator[] (gid_type const &g) const |
| Returns a reference to the specified vertex. More... | |
| vertex_reference | make_reference (vertex_descriptor const &gid) |
| Returns a reference to the specified vertex. More... | |
| const_vertex_reference | make_reference (vertex_descriptor const &gid) const |
| Returns a reference to the specified vertex. More... | |
| vertex_iterator | make_iterator (vertex_descriptor const &gid) |
| Returns an iterator to the specified vertex. More... | |
| container_type & | container (void) |
| cid_type | get_cid (void) const |
| Returns the id of this base-container. | |
| cid_type | cid (void) const |
| Returns the id of this base-container. Same as get_cid for compatibility. | |
| void | set_cid (cid_type cid) |
| domain_type const & | domain (void) const |
| Returns the domain of this base-container. | |
| gid_type | local_position (gid_type const &gid) const |
| Returns the position of the given vertex in this base-container. | |
| value_type | get_element (gid_type const &gid) |
| Returns a reference to the specified vertex. More... | |
| const_reference | get_element (gid_type const &gid) const |
| Returns a const reference to the specified vertex. More... | |
| reference | get_stored_element (gid_type const &gid) |
| Get the element corresponding to a specific GID. More... | |
| void | defer (bool defer) |
Public Types | |
| typedef Traits::domain_type | domain_type |
| typedef graph_base_container_base< D, stapl::NONMULTIEDGES, VertexP, EdgeP, Traits > | base_type |
| typedef base_type::value_type | value_type |
| typedef base_type::edge_descriptor | edge_descriptor |
| typedef base_type::edge_property | edge_property |
| typedef size_t | cid_type |
| typedef Traits::container_type | container_type |
| typedef Traits::vertex_property | vertex_property |
| typedef Traits::vertex_descriptor | vertex_descriptor |
| vertex_descriptor is the GID of the vertex. | |
| typedef Traits::simple_vertex_descriptor | simple_vertex_descriptor |
| The simple vertex descriptor is an integral type. Convertible to/from vertex_descriptor. | |
| typedef Traits::directness_type | directness_type |
| typedef Traits::multiplicity_type | multiplicity_type |
| typedef vertex_descriptor | gid_type |
| For graphs, the global identifier is the vertex descriptor. | |
| typedef Traits::vertex_impl_type | vertex_type |
| The type of the vertex. | |
| typedef Traits::edgelist_type | edgelist_type |
| The type of edgelist to use for each vertex. | |
| typedef Traits::edge_type | edge_type |
| The type of edge to use. | |
| typedef local_accessor_graph< graph_base_container_base > | accessor_t |
| typedef proxy< vertex_type, accessor_t > | vertex_reference |
| typedef local_iterator< graph_base_container_base, accessor_t > | vertex_iterator |
| typedef vertex_reference | reference |
| typedef vertex_iterator | iterator |
| typedef const_local_accessor_graph< graph_base_container_base > | const_accessor_t |
| typedef proxy< vertex_type, const_accessor_t > | const_vertex_reference |
| typedef const_vertex_reference | const_reference |
| typedef const_local_iterator< graph_base_container_base, const_accessor_t > | const_vertex_iterator |
| typedef const_vertex_iterator | const_iterator |
| typedef edgelist_type::iterator | adj_edge_iterator |
| typedef edgelist_type::const_iterator | const_adj_edge_iterator |
| typedef sequential::edge_iterator_adaptor< vertex_iterator > | edge_iterator |
Protected Attributes | |
| domain_type | m_domain |
| The domain of this base_container. | |
| container_type | m_data |
| m_data is the model and storage for the graph. The model affects the performance and capabilities of the graph. For example, the adjacency_list_model provides an adjacency list of vertices. | |
| cid_type | m_cid |
| This base_container's id. | |
| bool | m_defer_cleanup |
Class for Non-Multiedged graph's base-container. Derives from the graph_base_container_base class and overloads add_edge method for checking multiple edges.
| D | graph-attribute specifying Directedness (DIRECTED/UNDIRECTED). |
| VertexP | type of property for the vertex. Must be default assignable, copyable and assignable. |
| EdgeP | type of property for the edge. Must be default assignable, copyable and assignable. |
| Traits | A traits class that defines customizable components of graph, such as the domain type, vertex type, edge type, edgelist type, storage, etc. E.g. graph_base_container_traits. |
| stapl::graph_base_container_NME< D, VertexP, EdgeP, Traits >::graph_base_container_NME | ( | Domain const & | domain, |
| cid_type const & | cid | ||
| ) |
Creates a graph base container with a given size and domain.
This constructor is used during redistribution, where a default value for the vertex property isn't available.
| domain | Provides the domain of vertex-descriptors stored in this base container. |
| cid | Provides the id of this base-container. |
| stapl::graph_base_container_NME< D, VertexP, EdgeP, Traits >::graph_base_container_NME | ( | Domain const & | domain, |
| cid_type const & | cid, | ||
| value_type const & | default_value | ||
| ) |
Creates a graph base container with a given size and domain and constructs all elements with a default value for vertex.
| domain | Provides the domain of vertex-descriptors stored in this base container. |
| cid | Provides the id of this base-container. |
| default_value | provides the default value for the vertices stored in this base-container. |
| edge_descriptor stapl::graph_base_container_NME< D, VertexP, EdgeP, Traits >::add_edge | ( | edge_descriptor const & | edd, |
| edge_property const & | ep | ||
| ) |
Adds an edge to this base-container with the given edge descriptor and edge property only if an edge with the same descriptor does not exist.
| edd | The descriptor of edge to be added. |
| ep | The property of the edge to be added. |
| edge_descriptor stapl::graph_base_container_NME< D, VertexP, EdgeP, Traits >::add_edge | ( | edge_descriptor const & | edd, |
| edge_property const & | ep, | ||
| bool | bidir | ||
| ) |
Adds an edge to this base-container with the given edge descriptor and edge property. If bidir is true, also adds the sibling edge, if the target also exists in this base-container. The edges are added only if an edge with the same descriptor does not exist.
| edd | The descriptor of edge to be added. |
| ep | The property of the edge to be added. |
| bidir | Whether or not to add the undirected sibling edge. |
|
inherited |
Adds vertex to the component with the given vertex property. The descriptor is assigned automatically.
| v | The vertex property of the added vertex. |
|
inherited |
Adds vertex to the component with the given descriptor and property.
| gid | The explicit descriptor of the added vertex. |
| v | The vertex property of the added vertex. |
|
inherited |
Adds vertex to the component with the given descriptor, property and edges.
| v | The vertex to be added, along with edges and properties. |
|
inherited |
Reserves space for adjacent edges of the vertex with the specified descriptor.
| gid | The descriptor of the vertex which needs to reserve space. |
| num_adjacents | The number of adjacent edges for which space will be reserved. |
|
inherited |
Deletes the vertex with the specified descriptor.
| gid | The descriptor of the vertex to be deleted. |
|
inherited |
Deletes the vertex associated with the specified descriptor, but leave all the edges pointing to it from other vertices. Needed for migration.
| gid | identifier of the vertex to be suspended. |
|
inherited |
Checks if the vertex with the specified descriptor is local to the component, then returns an iterator pointing to it.
| gid | Descriptor of the vertex to be searched. |
|
inherited |
Checks if the vertex with the specified descriptor is local to the component, then returns an iterator pointing to it.
| gid | Descriptor of the vertex to be searched. |
|
inherited |
Adds an edge to this base-container from given source to target and edge property.
| source | The vertex descriptor of source. |
| target | The vertex descriptor of target. |
| ep | The property of the edge to be added. |
|
inherited |
Inserts an edge into this base-container with the given edge descriptor and edge property, using a comparator function to determine where in edge-container of a vertex the edge will be inserted. (Requires the edges of the source vertex to already be sorted by the comparator.)
| edd | The descriptor of edge to be inserted. |
| ep | The property of the edge to be inserted. |
| comp | Passed internal to std::lower_bound to find the spot to insert the new edge. |
|
inherited |
Inserts an edge into this base-container from given source to target descriptor and edge property, using a comparator function to determine where in edge-container of a vertex the edge will be inserted. (Requires the edges of the source vertex to already be sorted by the comparator.)
| source | The vertex descriptor of source. |
| target | The vertex descriptor of target. |
| ep | The property of the edge to be inserted. |
| comp | Passed internal to std::lower_bound to find the spot to insert the new edge. |
|
inherited |
Inserts an edge into this base-container with the given edge descriptor and edge property, using a comparator function to determine where in edge-container of a vertex the edge will be inserted. (Requires the edges of the source vertex to already be sorted by the comparator.)
| edd | The descriptor of edge to be inserted. |
| ep | The property of the edge to be inserted. |
| comp | Passed internal to std::lower_bound to find the spot to insert the new edge. |
|
inherited |
Inserts an edge into this base-container from given source to target descriptor and edge property, using a comparator function to determine where in edge-container of a vertex the edge will be inserted. (Requires the edges of the source vertex to already be sorted by the comparator.)
| source | The vertex descriptor of source. |
| target | The vertex descriptor of target. |
| ep | The property of the edge to be inserted. |
| comp | Passed internal to std::lower_bound to find the spot to insert the new edge. |
|
inherited |
|
inherited |
|
inherited |
Deletes an edge from this base-container with the given descriptor.
|
inherited |
Finds the edge with the given edge descriptor.
| ed | The descriptor of the edge to be found. |
| lit | The vertex iterator that will be updated to point to the source-vertex of the edge, if it was found. |
| ei | The iterator that will be updated to point to the edge, if found. |
|
inherited |
The number of vertices in this base-container.
|
inherited |
The number of vertices in this base-container. Same as num_vertices(), provided for compatibility.
|
inherited |
Tests if the base-container is empty or not.
|
inherited |
Sorts edges of each vertex based on given comparator.
| comp | The comparator used to sort edges. |
|
inherited |
Erases all edges that match a user-defined predicate.
| pred | A unary predicate that receives a single edge |
|
inherited |
Adds a bidirectional edge to the base-container with the given descriptor and property. The sibling edge has the source and target reversed. Both vertices should be in this base-container.
| ed | The descriptor of the edge to be added. If the id is not invalid, it will be used to create the edges, otherwise one will be generated. |
| p | The property of the edge to be added. |
|
inherited |
Applies a functor f on the specified vertex and passes a pointer to the graph distribution.
| gid | the descriptor of the vertex on which the functor will be applied. |
| f | the functor to be applied. |
| distribution | Pointer to the graph distribution |
|
inherited |
applies a functor f on the specified vertex.
| gid | the descriptor of the vertex on which the functor will be applied. |
| f | the functor to be applied. |
|
inherited |
applies a functor f on the specified vertex and returns a value.
| gid | the descriptor of the vertex on which the functor will be applied. |
| f | the functor to be applied. |
|
inherited |
applies a functor f on the specified vertex and returns a value.
| gid | the descriptor of the vertex on which the functor will be applied. |
| f | the functor to be applied. |
|
inherited |
Applies a functor f on the property of the specified vertex.
| gid | The descriptor of the vertex on which the functor will be applied. |
| f | The functor to be applied. |
|
inherited |
Applies a functor f on the property of the specified vertex.
| gid | The descriptor of the vertex on which the functor will be applied. |
| f | The functor to be applied. |
|
inherited |
Sets the property of the specified vertex to the given value.
| gid | The descriptor of the vertex. |
| vp | The new value of the property. |
|
inherited |
Applies a functor f on the property of the specified vertex.
| gid | The descriptor of the vertex on which the functor will be applied. |
| f | The functor to be applied. |
|
inherited |
Applies each element from the given container of functors on the property of the vertex specified by each element.
| fcont | The container of functors to be applied. Elements must additionally provide a target() method to specify the descriptor of the vertex on which the functor will be applied. |
|
inherited |
Applies a functor f on the property of the specified edge, if it exists.
| ed | The descriptor of the edge on which the functor will be applied. |
| f | The functor to be applied. |
|
inherited |
Applies a functor f on the property of the specified edge.
| ed | The descriptor of the edge on which the functor will be applied. |
| f | The functor to be applied. |
|
inherited |
Applies a functor f on the property of the specified edge, and returns the result.
| ed | The descriptor of the edge on which the functor will be applied. |
| f | The functor to be applied. |
|
inherited |
Returns a reference to the specified vertex.
| g | The descriptor of the vertex. |
|
inherited |
Returns a reference to the specified vertex.
| g | The descriptor of the vertex. |
|
inherited |
Returns a reference to the specified vertex.
| g | The descriptor of the vertex. |
|
inherited |
Returns a reference to the specified vertex.
| g | The descriptor of the vertex. |
|
inherited |
Returns an iterator to the specified vertex.
| gid | The descriptor of the vertex. |
|
inherited |
Returns a reference to the specified vertex.
| gid | The descriptor of the vertex. |
|
inherited |
Returns a const reference to the specified vertex.
| gid | The descriptor of the vertex. |
|
inherited |
Get the element corresponding to a specific GID.
This method is used in the redistribution of composed containers. It is needed to allow the distributor object to get the instance of the container_wrapper_ref for a container instance on one location and send it to another location where it will be placed in a base container by calling set_element. set_element only accepts instances of the stored type.
| gid | The id associated with the element for which we want to read the value. |
1.8.13