Home > @jsplumbtoolkit/core > Graph > getFarness
Graph.getFarness() method
Returns the farness centrality of the given node, ie. the sum of its distance from all other nodes, where the distance from one vertex to another is given by the associated cost of the Edge joining the two nodes.
Signature:
getFarness(vertex: Vertex | string): number;
Parameters
Parameter | Type | Description |
---|---|---|
vertex | Vertex | string | Vertex, or Vertex ID, to retrieve farness for. |
Returns:
number
Vertex's "farness".