You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/09/11 19:25:27 UTC

incubator-tinkerpop git commit: added PageRankVertexProgram console output to documentation -- #closes TINKERPOP3-827

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 39968d611 -> a6c7f0018


added PageRankVertexProgram console output to documentation -- #closes TINKERPOP3-827


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/a6c7f001
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/a6c7f001
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/a6c7f001

Branch: refs/heads/master
Commit: a6c7f001842de81bf7991709904a463d56e4f4f8
Parents: 39968d6
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Sep 11 11:25:52 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Sep 11 11:25:52 2015 -0600

----------------------------------------------------------------------
 docs/src/the-graphcomputer.asciidoc | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/a6c7f001/docs/src/the-graphcomputer.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-graphcomputer.asciidoc b/docs/src/the-graphcomputer.asciidoc
index ceab7f8..c4ad92e 100644
--- a/docs/src/the-graphcomputer.asciidoc
+++ b/docs/src/the-graphcomputer.asciidoc
@@ -126,7 +126,7 @@ public class PageRankVertexProgram implements VertexProgram<Double> { <1>
     private static final String TOTAL_ITERATIONS = "gremlin.pageRankVertexProgram.totalIterations";
     private static final String INCIDENT_TRAVERSAL_SUPPLIER = "gremlin.pageRankVertexProgram.incidentTraversalSupplier";
 
-     private ConfigurationTraversal<Vertex, Edge> configurationTraversal;
+    private ConfigurationTraversal<Vertex, Edge> configurationTraversal;
     private double vertexCountAsDouble = 1.0d;
     private double alpha = 0.85d;
     private int totalIterations = 30;
@@ -221,6 +221,17 @@ public class PageRankVertexProgram implements VertexProgram<Double> { <1>
 <9> Energy is aggregated, computed on according to the PageRank algorithm, and then disseminated according to the defined `MessageScope.Local`.
 <10> The computation is terminated after a pre-defined number of iterations.
 
+The above `PageRankVertexProgram` is used as follows.
+
+[gremlin-groovy,modern]
+----
+result = graph.compute().program(PageRankVertexProgram.build().create()).submit().get()
+result.memory().runtime
+g = result.graph().traversal(standard())
+g.V().valueMap('name',PageRankVertexProgram.PAGE_RANK)
+----
+
+
 [[peerpressurevertexprogram]]
 PeerPressureVertexProgram
 ~~~~~~~~~~~~~~~~~~~~~~~~~