@@ -1859,7 +1859,7 @@ InstallMethod(DigraphAllChordlessCycles, "for a digraph",
18591859D -> DigraphAllChordlessCyclesOfMaximalLength(D, INTOBJ_MAX));
18601860
18611861# Compute for a given rotation system the facial walks
1862- InstallMethod(FacialWalks, " for a digraph and a list" ,
1862+ InstallMethod(FacialWalks, " for a digraph and a dense list" ,
18631863[ IsDigraph, IsDenseList] ,
18641864function (D, rotationSystem )
18651865 local FacialWalk, facialWalks, remEdges, cycle;
@@ -1868,18 +1868,17 @@ function(D, rotationSystem)
18681868 ErrorNoReturn(" the 1st argument (digraph <D>) must be Eulerian" );
18691869 fi ;
18701870
1871- if Length(rotationSystem) <> DigraphNrVertices(D) then
1872- ErrorNoReturn( " the 2nd argument (list < rotationSystem>) is not a rotation " ,
1873- " system for the 1st argument (digraph <D>), expected a dense " ,
1874- " list of length " , DigraphNrVertices(D ), " but found a dense " ,
1875- " list of length " , Length(rotationSystem) );
1871+ if Length(rotationSystem) <> DigraphNrVertices(D)
1872+ or not ForAll( rotationSystem, IsList) then
1873+ ErrorNoReturn( " the 2nd argument (dense list <rotationSystem>) is not a " ,
1874+ " rotation system for the 1st argument (digraph <D> ), " ,
1875+ " expected a list of " , DigraphNrVertices(D), " lists, " );
18761876 fi ;
18771877
1878- if Difference( Union(rotationSystem), DigraphVertices(D)) <> [] then
1878+ if Union(rotationSystem) <> DigraphVertices(D) then
18791879 ErrorNoReturn(" the 2nd argument (dense list <rotationSystem>) is not a " ,
18801880 " rotation system for the 1st argument (digraph <D>), " ,
1881- " expected the union to be " , DigraphVertices(D), " but " ,
1882- " found " , Union(rotationSystem));
1881+ " expected its union to be the vertices of <D>," );
18831882 fi ;
18841883
18851884 # computes a facial cycles starting with the edge 'startEdge'
0 commit comments