Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/tst/testbugfix/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 487 B image not shown  

Quelle  2018-06-18-empty-OnTuples.tst   Sprache: unbekannt

 
#
# make sure OnTuples works correct even for plists that don't know they
# are empty
#
gap> adj := [[2], [], [2]];;
gap> new := List([1, 2], i -> []);;
gap> perm := (2, 1);;
gap> for i in [1, 2] do
> new[i ^ perm] := Concatenation(new[i ^ perm], adj[i]);;
> od;
gap> List(new, TNAM_OBJ);
[ "plain list", "plain list" ]
gap> List(new, x -> OnTuples(x, perm));
[ [  ], [ 1 ] ]
gap> List(new, TNAM_OBJ);
[ "plain list", "plain list" ]
gap> List(new, x -> OnSets(x, perm));
[ [  ], [ 1 ] ]

[ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet)  ]