Field, Graph, Node, Edge Statistics
There are a number of special properties on (numerical) fields that allow you to get a quick sense of the average, minimum, maximum, and summed values. This can be done by appending the field variable with .avg, .min, .max, and .sum respectively (e.g. freq.min will return the minimum frequency value).
A number of node and edge fields are calculated when they are first accessed. These include: betweenness, pagerank, degrank, hits, and rwbetweeness which correspond to the Betweenness, PageRank, Degree Distribution Rank, HITS rank, and Random-Walk Betweenness ranks. Also available are indegree, outdegree, and totaldegree. Because many of these take a long time to compute, the first time you access the property the value is calculated and cached. Changes to the graph will require an update to these ([need to describe]).
For example, we can calculate and color based on betweenness by doing:
v1.betweenness g.colorize(Node.betweenness,red,blue)
You can also ask a node for the shortest path to other nodes by either applying the unweightedShortestPath(target) or dijkstarShortestPath(target) methods. A list of edges representing the shortest path will be returned to you. In figure n we have found the shortest path between v291 and v376 and changed the color to blue through the command:
(v291.unweightedShortestPath(v376)).color = blue



