# `incident`

Complexity: | O(1)
Where Defined: | `boost/graph/graph_utility.hpp`

      template <class Graph>
      std::pair<typename graph_traits<Graph>::vertex_descriptor,
                typename graph_traits<Graph>::vertex_descriptor>
      incident(typename graph_traits<Graph>::edge_descriptor e, Graph& g)

This function takes and edge descriptor and returns the pair of vertices that are incident to the edge. For directed graphs, the `first` vertex is the source and the `second` vertex is the target. This function is equivalent to the expression `std::make_pair(source(e, g), target(e, g))`.

### Example

      edge_descriptor e;
      vertex_descriptor u, v;
      ...
      tie(u, v) = incident(e, g);

Copyright © 2000 | Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) Lie-Quan Lee, Univ.of Notre Dame (llee1@lsc.nd.edu) Andrew Lumsdaine, Univ.of Notre Dame (lums@lsc.nd.edu)