Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
C++ Boost

adjacency_list_traits<EdgeList, VertexList, Directed>

This class provides an alternate method for accessing some of the associated types of the adjacency_list class. The main reason for this class is that sometimes one would like to create graph properties whose values are vertex or edge descriptors. If you try to use graph_traits for this you will run into a problem with mutually recursive types. To get around this problem, the adjacency_list_traits class is provided, which gives the user access to the vertex and edge descriptor types without requiring the user to provide the property types for the graph.
  template <class EdgeList, class VertexList, class Directed>
  struct adjacency_list_traits {
    typedef ... vertex_descriptor;
    typedef ... edge_descriptor;
    typedef ... directed_category;
    typedef ... edge_parallel_category;
  };

Where Defined

boost/graph/adjacency_list.hpp

Template Parameters

ParameterDescriptionDefault
EdgeList The selector type for the edge container implementation. vecS
VertexList The selector type for the vertex container implementation. vecS
Directed The selector type whether the graph is directed or undirected. directedS

Model of

DefaultConstructible and Assignable

Type Requirements

Under construction.

Members

MemberDescription
vertex_descriptor The type for the objects used to identify vertices in the graph.
edge_descriptor The type for the objects used to identify edges in 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).

See Also

adjacency_list

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)