ertex v) const
    {
      //...
      std::cout &lt;&lt; &quot;adjacent vertices: &quot;;
      typename graph_traits&lt;Graph&gt;::adjacency_iterator ai;
      typename graph_traits&lt;Graph&gt;::adjacency_iterator ai_end;
      for (boost::tie(ai, ai_end) = adjacent_vertices(v, g);
           ai != ai_end; ++ai)
        std::cout &lt;&lt; index[*ai] &lt;&lt;  &quot; &quot;;
      std::cout &lt;&lt; std::endl;
    }
    //...
  };
</pre>
For vertex 4 the output is:
<pre>
  adjacent vertices: 0 1
</pre>
<p