clustering algorithm for graphs
