interface SearchClosenessCentralityOptions {
    directed?: boolean;
    harmonic?: boolean;
    root: string | NodeSingular;
    weight?(edge: EdgeSingular): number;
}

Properties

Methods

Properties

directed?: boolean

A boolean indicating whether the directed indegree and outdegree centrality is calculated (true) or whether the undirected centrality is calculated (false, default).

harmonic?: boolean

A boolean indicating whether the algorithm calculates the harmonic mean (true, default) or the arithmetic mean (false) of distances. The harmonic mean is very useful for graphs that are not strongly connected.

root: string | NodeSingular

The root node (selector or collection) for which the centrality calculation is made.

Methods