lorenzosaino Add support for networkx 2.x
NetworkX 2.0 added changes that are not backward-compatible.
This commit updates the code throughout to ensure that all
code works on both NetworkX 1.x and 2.x.
Latest commit aad3c6b Apr 30, 2018