A class to represent a graph. More...
#include <graph.hpp>
Classes | |
| class | graph_edge_iterator |
| Iterator on the graph's edges. More... | |
| class | graph_vertex_iterator |
| Iterator on the graph's vertices. More... | |
Public Types | |
| typedef S | vertex_type |
| Type of the vertices. | |
| typedef A | edge_type |
| Type of the edges. | |
| typedef Comp | vertex_compare |
| Binary predicate to compare vertices. | |
| typedef std::map< vertex_type, edge_type, vertex_compare > | neighbours_list |
| The adjacency list of a vertex. vertex_type is the target vertex, edge_type is the label on the edge. | |
| typedef std::map< vertex_type, neighbours_list, vertex_compare > | graph_content |
| The whole graph: an adjacency list for each vertex. | |
| typedef claw::graph< vertex_type, edge_type, vertex_compare > | self_type |
| Type of the current structure. | |
| typedef graph_vertex_iterator | vertex_iterator |
| typedef graph_edge_iterator | edge_iterator |
| typedef std::reverse_iterator< vertex_iterator > | reverse_vertex_iterator |
| typedef std::reverse_iterator< edge_iterator > | reverse_edge_iterator |
Public Member Functions | |
| void | add_edge (const vertex_type &s1, const vertex_type &s2, const edge_type &e=edge_type()) |
| void | add_vertex (const vertex_type &s) |
| bool | edge_exists (const vertex_type &s, const vertex_type &r) const |
| void | neighbours (const vertex_type &s, std::vector< vertex_type > &v) const |
| void | vertices (std::vector< vertex_type > &v) const |
| vertex_iterator | vertex_begin () const |
| vertex_iterator | vertex_end () const |
| vertex_iterator | vertex_begin (const vertex_type &s) const |
| reverse_vertex_iterator | vertex_rbegin () const |
| reverse_vertex_iterator | vertex_rend () const |
| reverse_vertex_iterator | vertex_rbegin (const vertex_type &s) const |
| edge_iterator | edge_begin () const |
| edge_iterator | edge_end () const |
| edge_iterator | edge_begin (const vertex_type &s1, const vertex_type &s2) const |
| reverse_edge_iterator | edge_rbegin () const |
| reverse_edge_iterator | edge_rend () const |
| reverse_edge_iterator | edge_rbegin (const vertex_type &s1, const vertex_type &s2) const |
| const edge_type & | label (const vertex_type &s, const vertex_type &r) const |
| std::size_t | outer_degree (const vertex_type &s) const |
| std::size_t | inner_degree (const vertex_type &s) const |
| std::size_t | vertices_count () const |
| std::size_t | edges_count () const |
A class to represent a graph.
Constraints on the template parameters:
| typedef graph_edge_iterator claw::graph< S, A, Comp >::edge_iterator |
| typedef A claw::graph< S, A, Comp >::edge_type |
| typedef std::map<vertex_type, neighbours_list, vertex_compare> claw::graph< S, A, Comp >::graph_content |
| typedef std::map<vertex_type, edge_type, vertex_compare> claw::graph< S, A, Comp >::neighbours_list |
The adjacency list of a vertex. vertex_type is the target vertex, edge_type is the label on the edge.
| typedef std::reverse_iterator<edge_iterator> claw::graph< S, A, Comp >::reverse_edge_iterator |
| typedef std::reverse_iterator<vertex_iterator> claw::graph< S, A, Comp >::reverse_vertex_iterator |
| typedef claw::graph<vertex_type, edge_type, vertex_compare> claw::graph< S, A, Comp >::self_type |
| typedef Comp claw::graph< S, A, Comp >::vertex_compare |
| typedef graph_vertex_iterator claw::graph< S, A, Comp >::vertex_iterator |
| typedef S claw::graph< S, A, Comp >::vertex_type |