Skip to main content

Home > @jsplumbtoolkit/core > Graph > getCloseness

Graph.getCloseness() method

Returns the Closeness centrality of the given vertex. This is the inverse of the vertex's farness.

Signature:

getCloseness(vertex: Vertex | string): number;

Parameters

ParameterTypeDescription
vertexVertex | stringVertex, or Vertex ID, to retrieve closeness for.

Returns:

number

Node's "closeness".