anchor.diff:  <4> Recall that at this point, there is a `Map` keyed by first and last vertex and with a value of just the shortest
   path. Extract the shortest path with `select(values)`, since that's the only portion required for the remainder of
   the traversal.
  -<5> Begin a mid-traversal iteration of all vertices to essentially count the shortest paths that pass through each one.
  -<6> Sum the counts for each vertex using `sack()`, normalize the value and label it as the "betweeness" to be the score.
  +<5> The "x" key contains the list of vertices stored from step 1 - unfold that list into "v" for later use. This step
  +will unwrap the vertex that is stored in the `Traverser` as
  +link:http://tinkerpop.apache.org/javadocs/x.y.z/full/org/apache/tinkerpop/gremlin/process/traversal/step/util/BulkSet.html[BulkSet]
  +so that it can be used directly in the `Traversal`.
  +<6> Iterate the set of shortest paths. At this point, it is worth noting that the traversal is iterating each vertex
  +in "v" and for each vertex in "v" it is iterating each `Path` in "shortestpaths".
  +<7> For each path, transform it to a count of the number of times that "v" from step 5 is encountered.
  +<8> Sum the counts for each vertex using `sack()`, normalize the value and label it as the "betweeness" to be the score.
   
   [[closeness-centrality]]
   Closeness Centrality
  
positive.code: 
  [gremlin-groovy,modern]
  ----
  g.V().as("a").repeat(both().simplePath()).emit().as("b").
    dedup().by(select("a","b")).
    path().
    group().by(limit(local, 1)).
            by(count(local).map {1/it.get()}.sum())
  ----
  
  The traversal starts by iterating over all vertices to find all paths that don't <<cycle-detection,cycle>>. It labels
  the start vertex as "a" and the ending vertex being emitted as "b". To perform this calculation, the measurement
  only requires the <<shortest-path,shortest path>> between each vertex pair, so the first occurrence of "a" and "b"
  as denoted in the `dedup().by(select("a","b"))` will be that shortest distance.
  
  To this point, the traversal has the unique list of shortest paths between each vertex pair and it is time to
  operate on that `path()`. To get the output displaying each start vertex with the centrality calculation, the `Path`
  objects can be grouped. In this case, `group()` takes two `by()` modulators. The first `by()` specifies the key for
  grouping and simply extracts the first vertex in the `Path` with `limit(local, 1)`. The second `by()` produces the
  value for the grouping and in this case:
  
  . `(count(local)` - counts the length of each path to produce the __distance__
  . `map {1/it.get()}` - uses a closure to divide the __distance__ by "1"
  . `sum()` - sums those values to produce the centrality score for that vertex
  
  [[eigenvector-centrality]]
  Eigenvector Centrality
  
negative.code: b.addEdge('next',c)
  c.addEdge('next',d)
  d.addEdge('next',e)
  g.withSack(0).V().store("x").repeat(both().simplePath()).emit().path(). <1>
    group().by(project("a","b").by(limit(local, 1)).                      <2>
                                by(tail(local, 1))).
            by(order().by(count(local))).                                 <3>
            select(values).as("shortestPaths").                           <4>
            select("x").unfold().as("v").                                 <5>
            select("shortestPaths").                                      <6>
              map(unfold().filter(unfold().where(eq("v"))).count()).      <7>
              sack(sum).sack().as("betweeness").        <8>
            select("v","betweeness")
  ----
  
  