@Override
public final void write(final DataOutput out) throws IOException {
out.writeLong(vertexId);
out.writeDouble(vertexValue);
out.writeLong(verticesWithEdgeValues.size());
verticesWithEdgeValues.forEachPair(new LongFloatProcedure() {
@Override
public boolean apply(long destVertexId, float edgeValue) {
try {
out.writeLong(destVertexId);
out.writeFloat(edgeValue);