@Override
            public void accept(final TraverserSet<Object> traverserSet) {
                Number total = 0.0;
                for (final Traverser.Admin<Object> traverser : traverserSet) {
                    total = add(total, mul(GValue.numberOf(traverser.sack()), traverser.bulk()));
                }
                for (final Traverser.Admin<Object> traverser : traverserSet) {
                    traverser.sack(div(mul(GValue.numberOf(traverser.sack()), traverser.bulk()), total));
                }
            }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/SackFunctions.java