title: Creating an adjacency Matrix from a JUNG Graph
body: <pre><code>Graph &lt; Integer, Integer&gt; g = new SparseMultigraph&lt;Integer, Integer&gt;();
      g.addVertex(1);g.addVertex(2);g.addVertex(3);
      g.addEdge(0,1,2 ,EdgeType.DIRECTED);g.addEdge(1,2,3 ,EdgeType.DIRECTED);g.addEdge(2,3,1 ,EdgeType.DIRECTED);g.addEdge(3,1,3 ,EdgeType.DIRECTED);
  </code></pre>
  
  <p>How can I convert this graph into an adjacency matrix taking into consideration that it is a directed graph.</p>