You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2018/02/27 17:18:29 UTC

[18/50] tinkerpop git commit: TINKERPOP-1357 Added pageRank step to centrality recipes

TINKERPOP-1357 Added pageRank step to centrality recipes

While not really a "recipe", it's worth letting people know who are reading about centrality that there is an easy way to do PageRank calculations. CTR


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

Branch: refs/heads/TINKERPOP-1777
Commit: bcffaad0a8064f549d4bc509884ac763b6542814
Parents: 7f39b18
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 15 09:44:12 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Feb 15 09:46:37 2018 -0500

----------------------------------------------------------------------
 docs/src/recipes/centrality.asciidoc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bcffaad0/docs/src/recipes/centrality.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/recipes/centrality.asciidoc b/docs/src/recipes/centrality.asciidoc
index 9a21636..1a3927e 100644
--- a/docs/src/recipes/centrality.asciidoc
+++ b/docs/src/recipes/centrality.asciidoc
@@ -174,3 +174,17 @@ traversal from taking longer than one hundred milliseconds to execute (the previ
 than that). While the answer provided with the `timeLimit()` is not the absolute ranking, it does provide a relative
 ranking that closely matches the absolute one. The use of `timeLimit()` in certain algorithms (e.g. recommendations)
 can shorten the time required to get a reasonable and usable result.
+
+[[pagerank-centrality]]
+=== PageRank Centrality
+
+While not technically a recipe, it's worth noting here in the "Centrality Section" that
+link:https://en.wikipedia.org/wiki/PageRank[PageRank] centrality can be calculated with Gremlin with the
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#pagerank-step[pageRank()]-step which is designed to work with
+`GraphComputer` (OLAP) based traversals.
+
+[gremlin-groovy,modern]
+----
+g = graph.traversal().withComputer()
+g.V().pageRank().by('pageRank').values('pageRank')
+----