Implements clustering algorithms on graphs.