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 657 B image not shown  

Quelle  2020-01-13-OnSets-Mutability.tst   Sprache: unbekannt

 
# OnSets would sometimes return a mutable list when it should have returned an
# immutable one; in HPC-GAP this got worse, as the final object was a mutable
# and *public* list.
#
# This only happened if the acting element was not internal, i.e., not a
# permutation, partial permutation or transformation.
gap> g:=SymmetricGroup(5);;
gap> phi:=ConjugatorAutomorphism(g,One(g));;

# mutable -> mutable
gap> l:=OnSets([ (1,2) ], phi);
[ (1,2) ]
gap> IsMutable(l);
true
#@if IsHPCGAP
gap> IsPublic(l);
false
#@fi

# immutable -> immutable
gap> l:=OnSets(Immutable([ (1,2) ]), phi);
[ (1,2) ]
gap> IsMutable(l);
false
#@if IsHPCGAP
gap> IsPublic(l);
true
#@fi

[ Dauer der Verarbeitung: 0.23 Sekunden  (vorverarbeitet)  ]