algorithms

algorithms.closeness

closeness(options: ClosenessOptions & AlgorithmWriteOptions): Promise<NodeScalarResult>

Compute closeness-centrality scores for all nodes (or a subset).

Dispatched to the background worker. Emits the standard algorithm lifecycle events. When writeTo is supplied scores are written to node properties (recorded in history, undoable).

optionsClosenessOptions & AlgorithmWriteOptionsClosenessOptions merged with AlgorithmWriteOptions.

Returns: Promise<NodeScalarResult>