Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Maas committed Dec 19, 2024
1 parent 9e253f6 commit ce58192
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/examples/partition_hypergraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
5 changes: 2 additions & 3 deletions python/examples/map_hypergraph_onto_target_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ce58192

Please sign in to comment.