コード例 #1
0
 /**
  * Prints a graph as two files (edges, vertices) to the file system.
  *
  * @param g The graph.
  * @param filePathEdges File path for edges.
  * @param filePathVertices File path for vertices.
  */
 @SuppressWarnings("rawtypes")
 public static void printGraph(Graph g, String filePathEdges, String filePathVertices) {
   try {
     g.getEdgesAsTuple3().writeAsCsv(filePathEdges, "\n", "\t", WriteMode.OVERWRITE);
     g.getVerticesAsTuple2().writeAsCsv(filePathVertices, "\n", "\t", WriteMode.OVERWRITE);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }