Skip to content

@graphty/algorithms / index / LeidenOptions

Interface: LeidenOptions ​

Defined in: indexed/leiden.ts:14

Options of the index-based Leiden. The names and defaults are the legacy leiden's, but maxIterations counts something else: see below.

Properties ​

maxIterations? ​

readonly optional maxIterations?: number

Defined in: indexed/leiden.ts:24

Cap on whole passes over the original graph, each running as many levels as it needs; default 100. The legacy leiden caps levels instead, so its maxIterations: 1 is one level where this is one full pass. The result's iterations counts levels.


randomSeed? ​

readonly optional randomSeed?: number

Defined in: indexed/leiden.ts:18

Seed of the visit orders; default 42.


resolution? ​

readonly optional resolution?: number

Defined in: indexed/leiden.ts:16

Resolution gamma: above 1 favours smaller communities; default 1.


threshold? ​

readonly optional threshold?: number

Defined in: indexed/leiden.ts:26

Stop once a pass improves modularity by no more than this; default 1e-7.