Page MenuHomePhabricator

[DDG] Fix duplicate edge removal during pi-block formation

Authored by bmahjour on Jan 5 2021, 8:36 AM.



I stumbled upon this issue while working on the graph printer. When creating pi-blocks we try to avoid creating duplicate edges between outside nodes and the pi-block when an edge is of the same kind and direction as another one that has already been created. We do this by keeping track of the edges in an enumerated array called EdgeAlreadyCreated. The problem is that this array is declared local to the loop that iterates over the nodes in the pi-block, so the information gets lost every time a new inside-node is iterated over. The fix is to move the declaration to the outer loop.

An example is provided in the unittest added in this revision.

Diff Detail

Event Timeline

bmahjour created this revision.Jan 5 2021, 8:36 AM
bmahjour requested review of this revision.Jan 5 2021, 8:36 AM
Meinersbur accepted this revision.Jan 5 2021, 9:36 AM


Consider clang-format before pushing to main.

This revision is now accepted and ready to land.Jan 5 2021, 9:36 AM
bmahjour updated this revision to Diff 315136.Jan 7 2021, 7:28 AM


This revision was landed with ongoing or failed builds.Jan 7 2021, 7:35 AM
This revision was automatically updated to reflect the committed changes.