Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/cli/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ pub fn run_from_cli(
max_iterations: 10,
pinned_profile: None,
resolution: 1.0,
refinement_gamma: 0.05,
};

crate::run(graph, &config)
Expand Down
6 changes: 0 additions & 6 deletions src/core/algorithm/hit_leiden.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ pub fn run(graph: &GraphInput, config: &RunConfig) -> Result<RunOutcome, HitLeid
&mut partition_state,
graph,
config.resolution,
config.refinement_gamma,
config.mode,
config.max_iterations,
);
Expand Down Expand Up @@ -169,7 +168,6 @@ fn multilevel_leiden(
state: &mut PartitionState,
graph: &GraphInput,
gamma: f64,
refinement_gamma: f64,
mode: crate::core::config::RunMode,
max_levels: usize,
) -> (usize, Vec<Vec<usize>>) {
Expand Down Expand Up @@ -197,12 +195,10 @@ fn multilevel_leiden(

// Refinement: within each community, merge singletons into subcommunities.
// Uses the SAME resolution as movement for the quality function.
// The refinement_gamma (0.05) is only for the connectivity criterion.
let mut subcommunities = refine_singleton_merge(
&state.supergraphs[0],
&state.community_mapping_per_level[0],
gamma,
refinement_gamma,
);

// The community assignment (for final output) comes from movement
Expand Down Expand Up @@ -279,7 +275,6 @@ fn multilevel_leiden(
&state.supergraphs[0],
&state.node_to_comm,
gamma,
refinement_gamma,
);
let new_subcomm_count = count_unique(&subcommunities);

Expand Down Expand Up @@ -455,7 +450,6 @@ fn refine_singleton_merge(
graph: &crate::core::graph::in_memory::InMemoryGraph,
node_to_community: &[usize],
gamma: f64,
_refinement_gamma: f64,
) -> Vec<usize> {
let n = graph.node_count;
if n == 0 {
Expand Down
5 changes: 0 additions & 5 deletions src/core/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ pub struct RunConfig {
/// Default 1.0 matches the HIT-Leiden paper (standard modularity).
/// Used for both movement and refinement quality functions.
pub resolution: f64,
/// Refinement connectivity criterion gamma. Controls which nodes participate
/// in refinement merging (must satisfy cut_size >= gamma * v_total * (S - v_total)).
/// Default 0.05. NOT used for quality function.
pub refinement_gamma: f64,
}

impl Default for RunConfig {
Expand All @@ -50,7 +46,6 @@ impl Default for RunConfig {
max_iterations: 10,
pinned_profile: None,
resolution: 1.0,
refinement_gamma: 0.05,
}
}
}
Expand Down
Loading