File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ DeclareAttributeThatReturnsDigraph("DigraphReverse", IsDigraph);
8989DeclareAttributeThatReturnsDigraph(" DigraphDual" , IsDigraph);
9090DeclareAttributeThatReturnsDigraph(" ReducedDigraph" , IsDigraph);
9191DeclareAttributeThatReturnsDigraph(" DigraphRemoveAllMultipleEdges" , IsDigraph);
92- DeclareAttributeThatReturnsDigraph(" DigraphRemoveAllEdges" , IsImmutableDigraph);
93- DeclareAttributeThatReturnsDigraph(" DigraphRemoveAllEdges" , IsMutableDigraph);
92+ DeclareAttributeThatReturnsDigraph(" DigraphRemoveAllEdges" , IsDigraph);
9493
9594# TODO replace all DeclareOperations below to
9695# DeclareAttributeThatReturnsDigraph, and remove the *Attr versions.
Original file line number Diff line number Diff line change @@ -2540,18 +2540,13 @@ end);
25402540InstallMethodThatReturnsDigraph(DigraphRemoveAllEdges,
25412541" for an immutable digraph" ,
25422542[ IsImmutableDigraph] ,
2543- D -> NullDigraph(DigraphNrVertices(D))
2544- );
2543+ D -> NullDigraph(DigraphNrVertices(D)));
25452544
25462545InstallMethodThatReturnsDigraph(DigraphRemoveAllEdges,
25472546" for a mutable digraph" ,
25482547[ IsMutableDigraph] ,
25492548function (D )
2550- local i, currentEdges;
2551- for i in [ 1 .. Length(OutNeighbours(D))] do
2552- currentEdges := DigraphOutEdges(D, i);
2553- DigraphRemoveEdges(D, currentEdges);
2554- od ;
2549+ D!. OutNeighbours := List(DigraphVertices(D), v -> [] );
25552550 return D;
25562551end );
25572552
Original file line number Diff line number Diff line change @@ -994,8 +994,8 @@ InstallMethod(SwapDigraphs,
994994[ IsMutableDigraph, IsMutableDigraph] ,
995995function (D1, D2 )
996996 local nb1, nb2;
997- nb1 := OutNeighboursMutableCopy (D1);
998- nb2 := OutNeighboursMutableCopy (D2);
997+ nb1 := OutNeighbours (D1);
998+ nb2 := OutNeighbours (D2);
999999 D1!. OutNeighbours := nb2;
10001000 D2!. OutNeighbours := nb1;
10011001end );
You can’t perform that action at this time.
0 commit comments