Tools for manipulating graphs and doing statistics on them