Skip to main content

Module community

Module community 

Source
Expand description

Community-detection algorithms (ALGO-CO-*). Phase 1: modularity (Newman-Girvan modularity of a partition). Phase 4: louvain multilevel community detection, leiden (Traag-Waltman-van Eck 2019), label_propagation (Raghavan-Albert-Kumara 2007 + Traag-Šubelj 2023 fast variant), fluid_communities (Parés et al. 2017), edge_betweenness_community (Girvan-Newman 2002), fast_greedy_modularity (Clauset-Newman-Moore 2004).

Structs§

EdgeBetweennessResult
Result of edge_betweenness_community.
FastGreedyResult
Result of fast_greedy_modularity / fast_greedy_modularity_weighted.
FluidOptions
Full option bag for fluid_communities_with_options.
FluidResult
Result of fluid_communities / fluid_communities_with_options.
LeidenOptions
Full set of options for leiden_with_options. Construct via LeidenOptions::default() and then mutate the fields you care about, mirroring the way upstream C exposes per-parameter defaults.
LeidenResult
Result of a Leiden run.
LouvainResult
Result of a Louvain run.
LpaOptions
Full option bag for label_propagation_with_options.
LpaResult
Result of a label-propagation run.

Enums§

LeidenObjective
Quality function (objective) that Leiden optimises. Mirrors igraph_leiden_objective_t.
LpaVariant
Which variant of label propagation to run. Mirrors igraph_lpa_variant_t.

Constants§

FLUID_DEFAULT_MAX_ITERATIONS
Default safety cap on outer iterations for fluid_communities / fluid_communities_with_options.
LEIDEN_DEFAULT_BETA
Default randomness used in the refinement step — same default as upstream igraph_community_leiden_simple (β = 0.01).
LEIDEN_DEFAULT_ITERATIONS
Default number of outer iterations. The reference paper and upstream both note that two iterations are usually enough.

Functions§

edge_betweenness_community
Run edge-betweenness community detection on graph.
edge_betweenness_community_weighted
Run weighted edge-betweenness community detection on graph with per-edge weights.
fast_greedy_modularity
Run fast greedy modularity community detection on graph (unweighted).
fast_greedy_modularity_weighted
Run fast greedy modularity community detection on graph with edge weights.
fluid_communities
Run Fluid Communities with default options (seed = 0, max_iterations = FLUID_DEFAULT_MAX_ITERATIONS).
fluid_communities_with_options
Run Fluid Communities with full option control.
label_propagation
Run label propagation with the default options (LpaVariant::Fast, no initial labels, no fixed vertices, seed 0).
label_propagation_weighted
Run label propagation with per-edge weights (default variant, no initial labels, no fixed vertices, seed 0).
label_propagation_with_options
Run label propagation with the full option bag.
leiden
Run Leiden with the default modularity objective, γ = 1, β = 0.01, two iterations, seed 0.
leiden_weighted
Run Leiden with per-edge weights (modularity objective, γ = 1, β = 0.01, two iterations, seed 0).
leiden_with_options
Run Leiden with the full set of options.
louvain
Run Louvain with the default options (γ = 1, unweighted, deterministic seed 0).
louvain_weighted
Run Louvain with per-edge weights (γ = 1, deterministic seed 0).
louvain_with_options
Run Louvain with the full set of options.
modularity
Modularity of graph with respect to community assignment membership.
modularity_directed
Directed modularity (Leicht-Newman, ALGO-CO-001b).
modularity_weighted
Weighted modularity (ALGO-CO-001c).