Path lengths are now just computed once for each node pair. A alternative function that combines path lenghts with node indices has been added.