  We utilize the PageRank vector to generalize the $k$-means clustering
algorithm to directed and undirected graphs. We demonstrate that PageRank and
other centrality measures can be used in our setting to robustly compute
centrality of nodes in a given graph. Furthermore, we show how our method can
be generalized to metric spaces and apply it to other domains such as point
clouds and triangulated meshes
