File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,9 @@ private void eliminateNode(Node node)
83
83
84
84
private Node getNodeWithoutSuccessors ( )
85
85
{
86
- // note: It would be more performant to check the nodes in reverse order, since that would allow decreases of "_nodeCount" in "eliminateNode"
87
- // as often as possible since high indices are preferred over low indices whenever there is a choice.
88
- // However, several test cases are violated if this change is made; It seems not all restrictions are properly added as edges here.
89
- for ( int i = 0 ; i < _nodeCount ; i ++ )
86
+ // note: Check the nodes in reverse order, since that allows decreases of "_nodeCount" in "eliminateNode"
87
+ // as often as possible because high indices are preferred over low indices whenever there is a choice.
88
+ for ( int i = _nodeCount - 1 ; i >= 0 ; i -- )
90
89
{
91
90
var node = _nodes [ i ] ;
92
91
if ( node . Eliminated )
You can’t perform that action at this time.
0 commit comments