in src/main/java/com/twitter/sbf/generator/GraphGenerator.java [498:520]
public static void main(String[] args) {
if (args.length < 6) {
throw new IllegalStateException(
"Usage: command <numClusters> <fractionGlobalEdges> <minProbInsideCluster> "
+ "<maxProbInsideCluster> <minClusterSize> <maxClusterSize> "
+ "(metis format output on stdout)"
);
} else {
RandomAdaptor r = new RandomAdaptor(new JDKRandomGenerator(1));
GraphGenerator gg = new GraphGenerator(Integer.parseInt(args[0]), Double.parseDouble(args[1]),
Double.parseDouble(args[2]), Double.parseDouble(args[3]), Integer.parseInt(args[4]),
Integer.parseInt(args[5]), r, true, 0.2f,
0.05f, 0.2f
);
Graph g = gg.generateWithDisjointClusters().getGraph();
Iterator<String> graphLines =
g.iterableStringRepresentation(new DecimalFormat("#.###")).iterator();
while (graphLines.hasNext()) {
System.out.println(graphLines.next());
}
}
}