graph_traits<Graph>
template <typename Graph>
struct graph_traits {
typedef typename Graph::vertex_descriptor vertex_descriptor;
typedef typename Graph::edge_descriptor edge_descriptor;
typedef typename Graph::adjacency_iterator adjacency_iterator;
typedef typename Graph::out_edge_iterator out_edge_iterator;
typedef typename Graph::in_edge_iterator in_edge_iterator;
typedef typename Graph::vertex_iterator vertex_iterator;
typedef typename Graph::edge_iterator edge_iterator;
typedef typename Graph::directed_category directed_category;
typedef typename Graph::edge_parallel_category edge_parallel_category;
typedef typename Graph::traversal_category traversal_category;
typedef typename Graph::vertices_size_type vertices_size_type;
typedef typename Graph::edges_size_type edges_size_type;
typedef typename Graph::degree_size_type degree_size_type;
};
| Parameter | Description |
|---|---|
| Graph | The graph type whose associated types are being accessed. |
| Member | Description |
|---|---|
| vertex_descriptor | The type for the objects used to identity vertices in the graph. |
| edge_descriptor | The type for the objects used to identity edges in the graph. |
| adjacency_iterator | The type for the iterators that traverse the vertices adjacent to a vertex. |
| out_edge_iterator | The type for the iterators that traverse through the out-edges of a vertex. |
| in_edge_iterator | The type for the iterators that traverse through the in-edges of a vertex. |
| vertex_iterator | The type for the iterators that traverse through the complete vertex set of the graph. |
| edge_iterator | The type for the iterators that traverse through the complete edge set of the graph. |
| directed_category | This says whether the graph is undirected (undirected_tag) or directed (directed_tag). |
| edge_parallel_category | This says whether the graph allows parallel edges to be inserted (allow_parallel_edge_tag) or if it automatically removes parallel edges (disallow_parallel_edge_tag). |
| traversal_category | The ways in which the vertices in the graph can be traversed. The traversal category tags are: incidence_graph_tag, adjacency_graph_tag, bidirectional_graph_tag, vertex_list_graph_tag, edge_list_graph_tag, adjacency_matrix_tag. You can also create your own tag which should inherit from one or more of the above. |
| vertices_size_type | The unsigned integer type used for representing the number of vertices in the graph. |
| edges_size_type | The unsigned integer type used for representing the number of edge in the graph. |
| degree_size_type | The unsigned integer type used for representing the degree of vertices in the graph. |
| Copyright © 2000-2001 |
Jeremy Siek,
Indiana University (jsiek@osl.iu.edu) Lie-Quan Lee, Indiana University (llee@cs.indiana.edu) Andrew Lumsdaine, Indiana University (lums@osl.iu.edu) |