Refactor so graph_clusters_* take adjacency matrix as argument