1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#############################################################################
##
#W set.tst GAP Library Alexander Hulpke
##
#H @(#)$Id: set.tst,v 4.6.4.3 2005/05/11 14:53:02 gap Exp $
##
#Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany
##
## Exclude from testall.g: why?
##
gap> START_TEST("$Id: set.tst,v 4.6.4.3 2005/05/11 14:53:02 gap Exp $");
gap> a:=Set([(1,3,2),(4,5)]);;
gap> b:=[(1,2),(5,9,7)];;
gap> UniteSet(a,b);
gap> a;
[ (5,9,7), (4,5), (1,2), (1,3,2) ]
gap> HasIsSSortedList(a);
true
gap> IsSSortedList(a);
true
gap> c:=Union(a,[(5,3,7),(1,2)]);
[ (5,9,7), (4,5), (3,7,5), (1,2), (1,3,2) ]
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> SubtractSet(c,[(1,2),(1,2,3)]);
gap> c;
[ (5,9,7), (4,5), (3,7,5), (1,3,2) ]
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> AddSet(c,5);
gap> c;
[ 5, (5,9,7), (4,5), (3,7,5), (1,3,2) ]
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> AddSet(a,(5,6));
#gap> HasIsSSortedList(a) and IsSSortedList(a);
#true
gap> c:=Union(a,[(1,2),(1,2,3)]);
[ (5,6), (5,9,7), (4,5), (1,2), (1,2,3), (1,3,2) ]
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> g:=Group((3,11)(4,7)(6,8)(9,10),(1,3)(2,8,10,12)(4,5,6,7)(9,11));;
gap> l:=AsSortedList(g);;
gap> HasIsSSortedList(l) and IsSSortedList(l);
true
gap> c:=Difference(l,[(3,11)( 4, 7)( 6, 8)( 9,10)]);;
gap> HasIsSSortedList(c) and IsSSortedList(c);
true
gap> Length(c);
7919
gap> c:=Difference(l,a);;
gap> c=l;
true
gap> STOP_TEST( "set.tst", 19900000 );
#############################################################################
##
#E
|