From ce581929ef01137d5b6ea5f4bccd7161813e2917 Mon Sep 17 00:00:00 2001 From: Nikolai Maas Date: Thu, 19 Dec 2024 12:06:18 +0100 Subject: [PATCH] fixes --- lib/examples/partition_hypergraph.cc | 6 +++--- python/examples/map_hypergraph_onto_target_graph.py | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/examples/partition_hypergraph.cc b/lib/examples/partition_hypergraph.cc index 933656680..6064ddc2e 100644 --- a/lib/examples/partition_hypergraph.cc +++ b/lib/examples/partition_hypergraph.cc @@ -18,11 +18,11 @@ int main(int argc, char* argv[]) { // Setup partitioning context mt_kahypar_context_t* context = mt_kahypar_context_from_preset(DEFAULT); - // In the following, we partition a graph into two blocks - // with an allowed imbalance of 3% and optimize the edge cut (CUT) + // In the following, we partition a hypergraph into two blocks + // with an allowed imbalance of 3% and optimize the connective metric (KM1) mt_kahypar_set_partitioning_parameters(context, 2 /* number of blocks */, 0.03 /* imbalance parameter */, - CUT /* objective function */); + KM1 /* objective function */); mt_kahypar_set_seed(42 /* seed */); // Enable logging mt_kahypar_status_t status = diff --git a/python/examples/map_hypergraph_onto_target_graph.py b/python/examples/map_hypergraph_onto_target_graph.py index 540a0ae18..75e897184 100644 --- a/python/examples/map_hypergraph_onto_target_graph.py +++ b/python/examples/map_hypergraph_onto_target_graph.py @@ -14,10 +14,9 @@ context = mtk.context_from_preset(mtkahypar.PresetType.DEFAULT) # In the following, we partition a hypergraph into two blocks # with an allowed imbalance of 3% and optimize the connectivity metric -context.set_partitioning_parameters( +context.set_mapping_parameters( 8, # number of blocks - number of nodes of the target graph - 0.03, # imbalance parameter - mtkahypar.Objective.KM1) # objective function - not relevant for mapping + 0.03) # imbalance parameter mtkahypar.set_seed(42) # seed context.logging = True