void createEdges(Integer[] v){
  graph.addEdge(new Double(Math.random()),v[0],v[1],EdgeType.DIRECTED);
  graph.addEdge(new Double(Math.random()),v[0],v[1],EdgeType.DIRECTED);
  graph.addEdge(new Double(Math.random()),v[0],v[1],EdgeType.DIRECTED);
  graph.addEdge(new Double(Math.random()),v[1],v[0],EdgeType.DIRECTED);
  graph.addEdge(new Double(Math.random()),v[1],v[0],EdgeType.DIRECTED);
  graph.addEdge(new Double(Math.random()),v[1],v[2]);
  graph.addEdge(new Double(Math.random()),v[1],v[2]);
}

void createEdges ( Integer [ ] v ) { graph . addEdge ( new Double ( Math . random ( ) ) , v [ 0 ] , v [ 1 ] , EdgeType . DIRECTED ) ; graph . addEdge ( new Double ( Math . random ( ) ) , v [ 0 ] , v [ 1 ] , EdgeType . DIRECTED ) ; graph . addEdge ( new Double ( Math . random ( ) ) , v [ 0 ] , v [ 1 ] , EdgeType . DIRECTED ) ; graph . addEdge ( new Double ( Math . random ( ) ) , v [ 1 ] , v [ 0 ] , EdgeType . DIRECTED ) ; graph . addEdge ( new Double ( Math . random ( ) ) , v [ 1 ] , v [ 0 ] , EdgeType . DIRECTED ) ; graph . addEdge ( new Double ( Math . random ( ) ) , v [ 1 ] , v [ 2 ] ) ; graph . addEdge ( new Double ( Math . random ( ) ) , v [ 1 ] , v [ 2 ] ) ; }
create edges for this demo graph
