Skip to content

Commit

Permalink
Fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielPointon committed Feb 6, 2024
1 parent 2b8cb5c commit 65d3719
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gap/oper.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ InstallMethod(VerticesReachableFrom, "for a digraph and a vertex",
[IsDigraph, IsList],
function(D, roots)
local N, index, current, succ, visited, prev, n, i, parent,
have_visited_root;
have_visited_root, queue, root;
N := DigraphNrVertices(D);
visited := BlistList([1 .. N], []);
# if 0 = root or root > N then
Expand All @@ -2016,7 +2016,7 @@ function(D, roots)

queue := [];
for root in roots do
Add(queue, root) # TODO: Structure differently for complexity reasons
Add(queue, root); # TODO: Structure differently for complexity reasons
end;

index = 0
Expand All @@ -2037,6 +2037,8 @@ function(D, roots)
Add(visited_as_ints, i);
fi;
od;

return visited_as_ints;
end);

InstallMethod(VerticesReachableFrom, "for a digraph and a list of vertices",
Expand Down

0 comments on commit 65d3719

Please sign in to comment.