Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/tst/testinstall/   (GAP Algebra Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 4 kB image not shown  

Quelle  listgen.tst   Sprache: unbekannt

 
Spracherkennung für: .tst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

#@local g,h,l,l2,p2,perm,t,filt,lcpy,permsp
gap> START_TEST("listgen.tst");
gap> List( [ 1 .. 10 ], x -> x^2 );
149162536496481100 ]
gap> List( [ 2121 ], x -> x - 1 );
1010 ]
gap> List();
Error, usage: List( <C>[, <func>] )
gap> List([1..10], x->x^2, "extra argument");
Error, usage: List( <C>[, <func>] )
gap> List([,1,,3,4], x->x>2);
[ , false,, true, true ]
gap> IsMutable(List([1,2,3],x->x^2));
true
gap> Flat( List( [ 1 .. 5 ], x -> [ 1 .. x ] ) );
112123123412345 ]
gap> Reversed( [ 1212 ] );
2121 ]
gap> Print(Reversed( [ 1 .. 10 ] ),"\n");
109 .. 1 ]
gap> filt:= Filtered( [ 1 .. 10 ], x -> x < 5 );
1234 ]
gap> HasIsSSortedList( filt );
true
gap> filt:= Filtered( [ 12345678910 ], x -> x < 5 );
1234 ]
gap> HasIsSSortedList( filt );
false
gap> Number( [ 1 .. 10 ], x -> x < 5 );
4
gap> Number( [ 1 .. 10 ] );
10
gap> Compacted( [ 1,, 2,, 3,, 4 ] );
1234 ]
gap> Collected( [ 1234123121 ] );
[ [ 14 ], [ 23 ], [ 32 ], [ 41 ] ]
gap> ForAll( [ 1 .. 10 ], IsInt );
true
gap> ForAny( [ 1 .. 10 ], x -> x > 5 );
true
gap> First( [ 1 .. 10 ], x -> x > 5 );
6
gap> PositionProperty( [ 13 .. 9 ], x -> x > 4 );
3
gap> PositionBound( [ ,,,, 1 ] );
5
gap> PositionBound( [] );
fail
gap> PositionNot( [ 21 ], 1 );
1
gap> PositionNot( [ 12 ], 1 );
2
gap> PositionNot( [ 11 ], 1 );
3
gap> PositionNot( [ 11 ], 13 );
4
gap> PositionNonZero( [ 11 ] );
1
gap> PositionNonZero( [ 01 ] );
2
gap> PositionNonZero( [ 00 ] );
3
gap> PositionNonZero( [ 00 ], 3 );
4
gap> l:= [ 1 .. 10 ];;
gap> SortParallel( [ 23415109786 ], l );
gap> l;
41235108976 ]
gap> SortParallel( [ 23415109786 ], l,
>               function( x, y ) return y < x; end );
gap> l;
10879652143 ]
gap> l :=  [ 23415109786 ];;
gap> SortBy(l,AdditiveInverseSameMutability);
gap> l;
10987654321 ]
gap> l2 := [ 23415109786 ];;
gap> lcpy := List(l2);;
gap> permsp := SortingPerm(l2);
(1,2,3,4)(6,10)(7,9,8)
gap> l2 = lcpy;
true
gap> perm:= Sortex(l2);
(1,2,3,4)(6,10)(7,9,8)
gap> SortingPerm(l2);
()
gap> Sortex(l2);
()
gap> IsSet(l2);
true
gap> Permuted( [ 23415109786 ], perm );
12345678910 ]
gap> Product( [ 23415109786 ] );
3628800
gap> Product( [ 23415109786 ], x -> x^2 );
13168189440000
gap> Sum( [ 23415109786 ] );
55
gap> Sum( [ 23415109786 ], x -> x^2 );
385
gap> Iterated( l, \+ );
55
gap> Iterated( l, \* );
3628800
gap> ListN( [1,2], [3,4], \+ );
46 ]
gap> MaximumList( l );
10
gap> MaximumList( [ 12 .. 20 ] );
20
gap> MaximumList( [ 108 .. 2 ] );
10
gap> MinimumList( l );
1
gap> MinimumList( [ 12 .. 20 ] );
1
gap> MinimumList( [ 108 .. 2 ] );
2
gap> PositionMaximum([2,4,6,4,2,6]);
3
gap> PositionMaximum([2,4,6,4,2,6], x -> -x);
1
gap> PositionMinimum([2,4,6,4,2,6]);
1
gap> PositionMinimum([2,4,6,4,2,6], x -> -x);
3
gap> PositionMaximum();
Error, Usage: PositionMaximum(<list>, [<func>])
gap> PositionMaximum(2);
Error, Usage: PositionMaximum(<list>, [<func>])
gap> PositionMaximum([1,2], 2);
Error, Usage: PositionMaximum(<list>, [<func>])
gap> PositionMaximum([1,2], x -> x, 2);
Error, Usage: PositionMaximum(<list>, [<func>])
gap> PositionMinimum();
Error, Usage: PositionMinimum(<list>, [<func>])
gap> PositionMinimum([1,2], 2);
Error, Usage: PositionMinimum(<list>, [<func>])
gap> PositionMinimum(2);
Error, Usage: PositionMinimum(<list>, [<func>])
gap> PositionMinimum([1,2], x -> x, 2);
Error, Usage: PositionMinimum(<list>, [<func>])
gap> PositionMaximum([]);
fail
gap> PositionMaximum([,,,]);
fail
gap> PositionMaximum([2,,4,,6]);
5
gap> PositionMinimum([2,,4,,6]);
1
gap> PositionMinimum([,,,]);
fail
gap> PositionMinimum([]);
fail
gap> String( l );
"[ 10987654321 ]"
gap> String( [ 1 .. 10 ] );
"[ 1 .. 10 ]"
gap> g:=Group((1,5)(2,6)(3,7)(4,8),(1,3)(2,4)(5,7)(6,8),(1,2)(3,4)(5,6)(7,8), 
> (5,6)(7,8), (5,7)(6,8), (3,4)(7,8), (3,5)(4,6), (2,3)(6,7));;
gap> h:=Subgroup(g,[(5,6)(7,8),(5,7)(6,8),(2,4)(6,8),(2,5)(4,7),(1,2)(3,4)]);;
gap> t:=RightTransversal(g,h);;
gap> Position(t,(5,7)(6,8));
fail
gap> IsSSortedList(t);
true
gap> p2:=Position(t,(5,7)(6,8));
fail

# that's all, folks
gap> STOP_TEST("listgen.tst");

[Dauer der Verarbeitung: 0.12 Sekunden, vorverarbeitet 2026-06-14]