title: Calculate number of in and out edges in a boost::graph vertex
body: <p>I've the following graph type</p>
  
  <pre><code>typedef boost::adjacency_list&lt;boost::listS, boost::vecS, boost::directedS, PathVertex, PathEdge&gt; GraphStructure;
  </code></pre>
  
  <p>I insert some directed edges.</p>
  
  <p>Now, for every vertex, I want to calculate number of in edges and out edges.</p>
  
  <p>For now, I've discovered the m_out_edges structure</p>
  
  <pre><code>GraphStructure xGraph;
  
  add_edge(0, 1, xGraph);
  add_edge(1, 2, xGraph);
  add_edge(2, 1, xGraph);
  
  int iValue = xGraph.m_vertices.at(0).m_out_edges.size();
  </code></pre>
  
  <p>But I don't know if it's what I want, and there's always the problem of in edges that I can't calculate at the moment.</p>
  
  <p>So, given an adjacency_list, how can I iterate through its vertices, and know how many are input edges and output edges, separately?</p>
  
  <p>Thanks in advance for your replies.</p>