@@ -0,0 +1,1338 @@
+/*%0AThe code is adjusted according to %0Ahttp://mail-archives.apache.org/mod_mbox/giraph-commits/201305.mbox/%253Ca293087f7d4249e19933d584b6c89d79@git.apache.org%253E%0A*/%0A%0Aimport org.apache.giraph.graph.BasicComputation;%0Aimport org.apache.giraph.graph.Vertex;%0Aimport org.apache.hadoop.io.Writable;%0Aimport org.apache.hadoop.io.WritableComparable;%0A%0Aimport org.apache.giraph.conf.LongConfOption;%0Aimport org.apache.giraph.edge.Edge;%0Aimport org.apache.hadoop.io.DoubleWritable;%0Aimport org.apache.hadoop.io.FloatWritable;%0Aimport org.apache.hadoop.io.LongWritable;%0Aimport org.apache.log4j.Logger;%0A%0Aimport java.io.IOException;%0A%0Apublic class PRComputation extends BasicComputation%3C%0A        LongWritable, DoubleWritable, FloatWritable, DoubleWritable%3E %7B%0A    %0A    @Override%0A    public void compute(Vertex%3CLongWritable, DoubleWritable, FloatWritable%3E vertex,%0A                        Iterable%3CDoubleWritable%3E messages) throws IOException %7B%0A    if (getSuperstep() %3E= 1) %7B%0A      double sum = 0;%0A      for (DoubleWritable message : messages) %7B%0A        sum += message.get();%0A      %7D%0A      vertex.getValue().set((0.15f / getTotalNumVertices()) + 0.85f * sum);%0A    %7D%0A    if (getSuperstep() %3C 50) %7B%0A      sendMessageToAllEdges(vertex,%0A          new DoubleWritable(vertex.getValue().get() / vertex.getNumEdges()));%0A    %7D else %7B%0A      vertex.voteToHalt();%0A    %7D%0A  %7D%0A%7D%0A

Create PRComputation.java