Skip to content

@graphty/algorithms / index / BetweennessOptions

Interface: BetweennessOptions ​

Defined in: indexed/betweenness.ts:14

Options of the index-based node betweenness.

Properties ​

endpoints? ​

readonly optional endpoints?: boolean

Defined in: indexed/betweenness.ts:24

Count a path's two ends as lying on it, as NetworkX's endpoints=True does. Default false. The legacy betweennessCentrality accepts this option and ignores it.


k? ​

readonly optional k?: number

Defined in: indexed/betweenness.ts:32

Sampled betweenness: how many distinct sources to draw when sources is not given. The draw is deterministic -- the same (n, k) draws the same sources every time, and the dispatcher hands an accelerator the drawn sources, so both paths run the same ones. With sources it must equal sources.length.


normalized? ​

readonly optional normalized?: boolean

Defined in: indexed/betweenness.ts:19

Divide by the number of ordered pairs a node can sit between: (n - 1)(n - 2) directed, half that undirected; with endpoints, n (n - 1) and half that. Default false.


sources? ​

readonly optional sources?: NodeSet

Defined in: indexed/betweenness.ts:26

Sampled betweenness: the source nodes to run from (indices, { mask } or { ids }). Duplicates run twice.