The Closeness function returns closeness and k-degree scores for each specified source vertex in a graph. The closeness scores are the inverse of the sum, the inverse of the average, and the sum of inverses for the shortest distances to all reachable target vertices (excluding the source vertex itself).The graph can be directed or undirected, weighted or unweighted.
For large graph, you can apply the function to a random sample of the specified target vertices to get an efficient approximation of the closeness and k-degree scores.