Skip to content

Commit

Permalink
Move small blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
T3C42 committed Jan 21, 2025
1 parent f384200 commit f23f3ad
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions mt-kahypar/dynamic/strategies/localFM_small_blocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ namespace mt_kahypar::dyn {
//TODO: mixed queries -> remove node from local_fm_nodes
//TODO: does this work for multiple node removals?
for (const HyperedgeID& he : hypergraph.incidentEdges(hn)) {

for (const HypernodeID& hn2 : hypergraph.pins(he)) {
if (partitioned_hypergraph_s->pinCountInPart(he, partitioned_hypergraph_s->partID(hn2)) <= 100) {
local_fm_nodes.push_back(hn2);
}
}

//skip removed edges
bool skip = false;
for (const HyperedgeID &he2 : change.removed_edges) {
Expand All @@ -178,12 +185,6 @@ namespace mt_kahypar::dyn {
continue;
}

for (const HypernodeID& hn2 : hypergraph.pins(he)) {
if (partitioned_hypergraph_s->pinCountInPart(he, partitioned_hypergraph_s->partID(hn2)) <= 100) {
local_fm_nodes.push_back(hn2);
}
}

size_t nodes_in_removed_partition_prior_removal = partitioned_hypergraph_s->pinCountInPart(he, partitioned_hypergraph_s->partID(hn));
//gain increases for remaining node in partition because moving it to another partition will decrease the cut
if (nodes_in_removed_partition_prior_removal == 2) {
Expand Down

0 comments on commit f23f3ad

Please sign in to comment.