STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Attributes
stapl::dynamic_graph_view< VGraph, VAdaptor, EAdaptor > Class Template Reference

A dynamic graph view using adaptors for vertex and edge properties. More...

Public Member Functions

 dynamic_graph_view (VGraph &g)
 
vertex_descriptor add_vertex (void)
 Add a vertex with the default property. The descriptor of this is generated automatically. More...
 
vertex_descriptor add_vertex (vertex_property &vp)
 Add a vertex with the specified property. The descriptor of this is generated automatically. More...
 
vertex_descriptor add_vertex (vertex_descriptor vd, vertex_property &vp)
 Add a vertex with the specified descriptor and property. More...
 
bool add_edge (edge_descriptor &ed)
 Adds an edge with given descriptor and default edge property. More...
 
void erase (void)
 Clear this graph, deleting all its vertices and edges.
 
bool delete_vertex (vertex_descriptor const &vd)
 Delete the specified vertex. More...
 
bool delete_edge (edge_descriptor const &ed)
 Delete the specified edge. More...
 
edge_iterator edges_begin ()
 Returns an iterator over all the edges of the graph.
 
const_edge_iterator edges_begin () const
 Returns an iterator over all the edges of the graph.
 
edge_iterator edges_end ()
 Returns an iterator over all the edges of the graph.
 
const_edge_iterator edges_end () const
 Returns an iterator over all the edges of the graph.
 
size_t get_max_descriptor () const
 Returns the maximum descriptor for the vertex.
 
size_t get_num_vertices () const
 Returns the number of vertices in this graph.
 
size_t get_num_edges () const
 Returns the number of edges in this graph.
 
vertex_iterator find_vertex (vertex_descriptor const &vd)
 Finds the vertex with the specified descriptor, and returns a vertex_iterator pointing to it. If not found, the end of the graph is returned. More...
 
const_vertex_iterator find_vertex (vertex_descriptor const &vd) const
 Finds the vertex with the specified descriptor, and returns a vertex_iterator pointing to it. If not found, the end of the graph is returned. More...
 
bool find_edge (edge_descriptor const &ed, vertex_iterator &vi, adj_edge_iterator &ei)
 Finds the edge with the specified descriptor, and returns an iterator to its source vertex and an adj_edge_iterator pointing to the edge. More...
 
bool find_edge (const edge_descriptor &ed, const_vertex_iterator &vi, const_adj_edge_iterator &ei) const
 Finds the edge with the specified descriptor, and returns an iterator to its source vertex and an adj_edge_iterator pointing to the edge. More...
 
vertex_iterator begin ()
 
const_vertex_iterator begin () const
 
vertex_iterator end ()
 
const_vertex_iterator end () const
 

Public Types

typedef base_type::vertex_descriptor vertex_descriptor
 
typedef base_type::edge_descriptor edge_descriptor
 
typedef base_type::vertex_iterator vertex_iterator
 
typedef base_type::const_vertex_iterator const_vertex_iterator
 
typedef base_type::adj_edge_iterator adj_edge_iterator
 
typedef base_type::const_adj_edge_iterator const_adj_edge_iterator
 
typedef base_type::edge_iterator edge_iterator
 
typedef base_type::const_edge_iterator const_edge_iterator
 
typedef vertex_iterator::property_type vertex_property
 
typedef adj_edge_iterator::property_type edge_property
 
typedef base_type::vertex_reference vertex_reference
 
typedef const_vertex_iterator::value_type const_vertex_reference
 

Protected Attributes

VGraph & m_g
 
VAdaptor m_vadapt
 

Detailed Description

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
class stapl::dynamic_graph_view< VGraph, VAdaptor, EAdaptor >

A dynamic graph view using adaptors for vertex and edge properties.

Template Parameters
VGraphThe type of the input graph.
VAdaptorThe type of the vertex property adaptor.
EAdaptorThe type of the edge property adaptor.

Member Function Documentation

◆ add_vertex() [1/3]

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
vertex_descriptor stapl::dynamic_graph_view< VGraph, VAdaptor, EAdaptor >::add_vertex ( void  )

Add a vertex with the default property. The descriptor of this is generated automatically.

Returns
The descriptor for the new vertex.

◆ add_vertex() [2/3]

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
vertex_descriptor stapl::dynamic_graph_view< VGraph, VAdaptor, EAdaptor >::add_vertex ( vertex_property &  vp)

Add a vertex with the specified property. The descriptor of this is generated automatically.

Returns
The descriptor for the new vertex.

◆ add_vertex() [3/3]

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
vertex_descriptor stapl::dynamic_graph_view< VGraph, VAdaptor, EAdaptor >::add_vertex ( vertex_descriptor  vd,
vertex_property &  vp 
)

Add a vertex with the specified descriptor and property.

Returns
The descriptor for the new vertex.

◆ add_edge()

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
bool stapl::dynamic_graph_view< VGraph, VAdaptor, EAdaptor >::add_edge ( edge_descriptor &  ed)

Adds an edge with given descriptor and default edge property.

Parameters
edDescriptor of the desired edge.
Returns
True if the edge was added, or false otherwise.

◆ delete_vertex()

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
bool stapl::dynamic_graph_view< VGraph, VAdaptor, EAdaptor >::delete_vertex ( vertex_descriptor const &  vd)

Delete the specified vertex.

Parameters
vdThe vertex to be deleted.
Returns
True if vertex was deleted, or false otherwise.

◆ delete_edge()

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
bool stapl::dynamic_graph_view< VGraph, VAdaptor, EAdaptor >::delete_edge ( edge_descriptor const &  ed)

Delete the specified edge.

Parameters
edThe edge to be deleted.
Returns
True if edge was deleted, or false otherwise.

◆ find_vertex() [1/2]

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
vertex_iterator stapl::static_graph_view< VGraph, VAdaptor, EAdaptor >::find_vertex ( vertex_descriptor const &  vd)
inherited

Finds the vertex with the specified descriptor, and returns a vertex_iterator pointing to it. If not found, the end of the graph is returned.

Parameters
vdDescriptor of the vertex.
Returns
A vertex_iterator to the specified vertex, if found, or a vertex_iterator to the end of the graph otherwise.

◆ find_vertex() [2/2]

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
const_vertex_iterator stapl::static_graph_view< VGraph, VAdaptor, EAdaptor >::find_vertex ( vertex_descriptor const &  vd) const
inherited

Finds the vertex with the specified descriptor, and returns a vertex_iterator pointing to it. If not found, the end of the graph is returned.

Parameters
vdDescriptor of the vertex.
Returns
A vertex_iterator to the specified vertex, if found, or a vertex_iterator to the end of the graph otherwise.

◆ find_edge() [1/2]

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
bool stapl::static_graph_view< VGraph, VAdaptor, EAdaptor >::find_edge ( edge_descriptor const &  ed,
vertex_iterator vi,
adj_edge_iterator ei 
)
inherited

Finds the edge with the specified descriptor, and returns an iterator to its source vertex and an adj_edge_iterator pointing to the edge.

Parameters
edDescriptor of the edge.
vivertex_iterator pointing to the source vertex of the edge, populated by the method.
aeiadj_edge_iterator pointing to the specified edge, populated by the method.
Returns
Whether or not the edge was found.

◆ find_edge() [2/2]

template<class VGraph, class VAdaptor = use_default, class EAdaptor = use_default>
bool stapl::static_graph_view< VGraph, VAdaptor, EAdaptor >::find_edge ( const edge_descriptor &  ed,
const_vertex_iterator vi,
const_adj_edge_iterator ei 
) const
inherited

Finds the edge with the specified descriptor, and returns an iterator to its source vertex and an adj_edge_iterator pointing to the edge.

Parameters
edDescriptor of the edge.
vivertex_iterator pointing to the source vertex of the edge, populated by the method.
aeiadj_edge_iterator pointing to the specified edge, populated by the method.
Returns
Whether or not the edge was found.

The documentation for this class was generated from the following file: