Expand description
Louvain community detection with deterministic seeding.
Implements the Louvain algorithm from scratch, matching the graphology implementation’s traversal order and PRNG for bit-exact deterministic output. Output is pure in-memory — no disk persistence.
Functions§
- aggregate_
bridges - Aggregate inter-cluster edges into undirected
CommunityBridgeentries. - clusters_
in_ mem - Cluster ids from
louvainthat have at least one member living inmem. - detect_
communities - Detect communities using the Louvain algorithm. Uses a seeded PRNG for deterministic results.
- generate_
auto_ summary - Generate a default cluster summary by joining member entity titles.
Called at render time (never stored) — see
render::render_overview_markdownandrender::render_community_context_section. - mulberry32
- Mulberry32 PRNG matching the JS implementation.
Uses i32 signed arithmetic for
| 0coercion (overflow wrapping), but>>>(unsigned right shift) must use u32 casts — JS>>> nfirst converts to unsigned 32-bit, then shifts with zero-fill.