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

Quelle  2018-07-04-sort.tst   Sprache: unbekannt

 
# Check Sort does not compare identical values with themselves.
gap> l:=[
>  [ 1, 1, 2, 1, 3, 1, 4, 2, 5, 1 ], [ 1, 1, 2, 1, 3, 2, 5, 2 ],
>  [ 1, 3, 2, 1, 3, 1, 4, 1, 6, 1 ], [ 1, 1, 2, 1, 4, 4 ],
>  [ 1, 2, 3, 2, 4, 1, 6, 1 ], [ 1, 1, 3, 2, 4, 3 ],
>  [ 1, 1, 3, 2, 5, 1, 6, 1 ], [ 1, 1, 3, 3, 4, 1, 5, 1 ],
>  [ 1, 1, 4, 1, 6, 2 ], [ 1, 2, 2, 1, 3, 1, 5, 1, 6, 1 ],
>  [ 1, 2, 2, 1, 3, 2, 4, 1, 5, 1 ], [ 1, 2, 2, 1, 4, 2, 6, 1 ],
>  [ 1, 2, 3, 1, 6, 2 ], [ 1, 1, 3, 1, 4, 2, 6, 1 ],
>  [ 1, 1, 2, 1, 4, 1, 5, 1, 6, 1 ], [ 1, 3, 2, 1, 6, 2 ],
>  [ 2, 1, 3, 1, 4, 1, 5, 2 ], [ 2, 1, 4, 3, 5, 1 ], [ 2, 1, 5, 2, 6, 1 ],
>  [ 3, 1, 4, 1, 5, 1, 6, 1 ], [ 3, 1, 4, 4 ], [ 3, 2, 4, 2, 5, 1 ],
>  [ 3, 3, 5, 2 ], [ 4, 3, 6, 1 ], [ 5, 1, 6, 2 ]
> ];;
gap> Sort(l, function(x,y) Assert(0, not IsIdenticalObj(x,y)); return x<y; end);;

[ Dauer der Verarbeitung: 0.22 Sekunden  (vorverarbeitet)  ]