Skip to content

Commit

Permalink
Switch to a more efficient list implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielPointon committed Feb 7, 2024
1 parent 4626066 commit 3c78227
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gap/oper.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2034,15 +2034,15 @@ function(D, roots)
od;

graph_out_neighbors := OutNeighbors(D);
queue := ListWithIdenticalEntries(N, -1);
queue := EmptyPlist(N);
queue_tail := 0;
for root in roots do
queue_tail := queue_tail + 1;
queue[queue_tail] := root;
od;

index := 1;
while index <= Length(queue) and queue[index] > 0 do
while IsBound(queue[index]) do
element := queue[index];
node_neighbours := graph_out_neighbors[element];
for neighbour in node_neighbours do
Expand Down

0 comments on commit 3c78227

Please sign in to comment.