/// <summary> /// Calls <code>rated(int, int)</code> with both arguments as zero. /// </summary> public static GraphTraversal <Vertex, IDictionary <string, long> > DistributionForAges(this GraphTraversal <Vertex, Edge> t, int start, int end) { if (start < 18) { throw new ArgumentException("Age must be 18 or older"); } if (start > end) { throw new ArgumentException("Start age must be greater than end age"); } if (end > 120) { throw new ArgumentException("Now you're just being crazy"); } return(t.Filter(__.OutV().Has(KeyAge, Between(start, end))).Group <string, long>().By(KeyRating).By(__.Count())); }