adjacency_matrix is represented as sparse matrix, in line with networkx1.9