Get the adjacencyList of this graph where nodes are represented by their index in the nodes list.
auto g1 = Graph!int([1, 2, 3, 4]); g1 ~= g1.edge(1, 1); g1 ~= g1.edge(1, 2); g1 ~= g1.edge(2, 2); g1 ~= g1.edge(2, 3); g1 ~= g1.edge(2, 4); g1 ~= g1.edge(3, 4); assert(g1.adjacencyList() == [ [0, 1], [0, 1, 2, 3], [1, 3], [1, 2], ]);
See Implementation
Get the adjacencyList of this graph where nodes are represented by their index in the nodes list.