Skip to content

Commit

Permalink
Fix linting (maybe)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielPointon committed Jan 31, 2024
1 parent 7bb968a commit 37feffc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions gap/oper.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2048,21 +2048,21 @@ InstallMethod(VerticesReachableFrom, "for a digraph and a list of vertices",
function(D, roots)
local accessible_from_node, candidate, root, i, visited, visited_as_ints, N;
N := DigraphNrVertices(D);
visited := BlistList([1..N], []);
visited := BlistList([1 .. N], []);
for root in roots do
if not(visited[root]) then
accessible_from_node := VerticesReachableFrom(D, root);
for candidate in accessible_from_node do
if not(visited[candidate]) then
visited[candidate] :=true;
visited[candidate] := true;
fi;
od;
fi;
od;

visited_as_ints := [];

for i in [1..N] do
for i in [1 .. N] do
if visited[i] then;
Add(visited_as_ints, i);
fi;
Expand All @@ -2081,7 +2081,7 @@ function(D, roots)
fi;

N := Length(roots);
vertex_in_subset := BlistList([1..N], []);
vertex_in_subset := BlistList([1 .. N], []);
reachable := VerticesReachableFrom(D, roots);

for i in roots do
Expand Down
4 changes: 2 additions & 2 deletions tst/standard/oper.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2803,13 +2803,13 @@ gap> D2 := CompleteDigraph(10);
<immutable complete digraph with 10 vertices>
gap> VerticesReachableFrom(D1, [1]);
[ 1, 2, 3, 4, 5 ]
gap> VerticesReachableFrom(D1, [1,2]);
gap> VerticesReachableFrom(D1, [1, 2]);
[ 1, 2, 3, 4, 5 ]
gap> VerticesReachableFrom(D2, [1]);
[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
gap> D3 := CompleteDigraph(7);
<immutable complete digraph with 7 vertices>
gap> D3_edges := [1..7];
gap> D3_edges := [1 .. 7];
[ 1 .. 7 ]
gap> for i in D3_edges do
> D3 := DigraphRemoveEdge(D3, [1, i]);
Expand Down

0 comments on commit 37feffc

Please sign in to comment.