Claw  1.7.3
Classes | Public Types | Public Member Functions | List of all members
claw::graph< S, A, Comp > Class Template Reference

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_typelabel (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
 

Detailed Description

template<class S, class A = meta::no_type, class Comp = std::less<S>>
class claw::graph< S, A, Comp >

A class to represent a graph.

Constraints on the template parameters:

Author
Julien Jorge

Definition at line 79 of file graph.hpp.


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