Revert "nave undirected graph implementation"

This reverts commit 5fbaab6c2648dfe2e93bf4381d74e10f7884aa99.
Revert "Revert "nave undirected graph implementation""

This reverts commit 316c06559f04eca04e7e2c6dc245f6a924f8c88b.