Repository: tinkerpop Updated Branches: refs/heads/master f1d6a5bff -> 82d9e3bb6
Minor fixes to centrality recipe examples CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/82d9e3bb Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/82d9e3bb Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/82d9e3bb Branch: refs/heads/master Commit: 82d9e3bb67f7fb93651bd3aba9ceeb375617708d Parents: f1d6a5b Author: Stephen Mallette <sp...@genoprime.com> Authored: Mon Jun 13 11:52:34 2016 -0400 Committer: Stephen Mallette <sp...@genoprime.com> Committed: Mon Jun 13 11:53:05 2016 -0400 ---------------------------------------------------------------------- docs/src/recipes/centrality.asciidoc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/82d9e3bb/docs/src/recipes/centrality.asciidoc ---------------------------------------------------------------------- diff --git a/docs/src/recipes/centrality.asciidoc b/docs/src/recipes/centrality.asciidoc index 5207075..90e73df 100644 --- a/docs/src/recipes/centrality.asciidoc +++ b/docs/src/recipes/centrality.asciidoc @@ -31,12 +31,11 @@ edges associated to each vertex. [gremlin-groovy,modern] ---- -g.V().bothE().group().by(otherV()).by(count()) <1> -g.V().inE().group().by(inV()).by(count()) <2> -g.V().outE().group().by(outV()).by(count()) <3> -g.V().group().by().by(outE().count()) <4> -g.V().project("v","degree").by().by(bothE().count()) <5> -g.V().project("v","degree").by().by(bothE().count()). <6> +g.V().group().by().by(bothE().count()) <1> +g.V().group().by().by(inE().count()) <2> +g.V().group().by().by(outE().count()) <3> +g.V().project("v","degree").by().by(bothE().count()) <4> +g.V().project("v","degree").by().by(bothE().count()). <5> order().by(select("degree"), decr). limit(4) ---- @@ -45,10 +44,9 @@ g.V().project("v","degree").by().by(bothE().count()). <6> incoming and outgoing. <2> Calculation of in-degree centrality which only counts incoming edges to a vertex. <3> Calculation of out-degree centrality which only counts outgoing edges from a vertex. -<4> Same calculation as the previous traversal, but includes all vertices, even those with a zero -<5> The previous examples all produce a single `Map` as their output. While that is a desireable output, producing a +<4> The previous examples all produce a single `Map` as their output. While that is a desireable output, producing a stream of `Map` objects can allow some greater flexibility. -<6> For example, use of a stream enables use of an ordered limit that can be executed in a distributed fashion in +<5> For example, use of a stream enables use of an ordered limit that can be executed in a distributed fashion in OLAP traversals. [[betweeness-centrality]]