protected FastSharder createSharder(String graphName, int numShards) throws IOException {
this.numShards = numShards;
return new FastSharder<FloatPair, Float>(graphName, numShards, new VertexProcessor<FloatPair>() {
/* For lists (hubs), the vertex value will encode the total number of edges */
public FloatPair receiveVertexValue(int vertexId, String token) {
return new FloatPair(0.0f, Float.parseFloat(token));
}
}, new EdgeProcessor<Float>() {
public Float receiveEdge(int from, int to, String token) {
return Float.parseFloat(token);
}