spielwiese
Last change
on this file was
31e58a,
checked in by Hans Schoenemann <hannes@…>, 6 years ago
|
fix: sets.lib and format of *tst
|
-
Property mode set to
100644
|
File size:
937 bytes
|
Line | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | LIB "methods.lib"; |
---|
5 | printlevel=0; |
---|
6 | |
---|
7 | |
---|
8 | HashTable H = hashTable(list("a","b","c"),list("aa","bb","cc")); |
---|
9 | H; |
---|
10 | |
---|
11 | HashTable H = hashTable(list("a","b","c"),list("aa","bb","cc")); |
---|
12 | selectKey(H,"b"); |
---|
13 | H*"b"; |
---|
14 | |
---|
15 | HashTable H = hashTable(list("a","b","c"),list("aa","bb","cc")); |
---|
16 | HashTable W = hashTable(list("d","e","f"),list("aa","bb","cc")); |
---|
17 | addHashTables(H,W); |
---|
18 | H+W; |
---|
19 | |
---|
20 | proc square(int i){return(i^2);}; |
---|
21 | HashTable H1 = hashTable(list(list("int")),list("square")); |
---|
22 | Method m1 = method(H1); |
---|
23 | installMethod(m1,"tst"); |
---|
24 | tst(2); |
---|
25 | proc kbase2(ideal I,int n){return(kbase(I,n));} |
---|
26 | HashTable H2 = hashTable(list(list("ideal","int")),list("kbase2")); |
---|
27 | Method m2=method(H2); |
---|
28 | Method m=m1+m2; |
---|
29 | installMethod(m,"tst"); |
---|
30 | ring R=0,(x,y),dp; |
---|
31 | ideal I = x^3,y^7; |
---|
32 | I=std(I); |
---|
33 | tst(I,2); |
---|
34 | HashTable F = hashTable(list(list("int"),list("ideal","int")),list("square","kbase2")); |
---|
35 | Method m3 = method(F); |
---|
36 | installMethod(m3,"tst"); |
---|
37 | tst(I,2); |
---|
38 | tst(3); |
---|
39 | |
---|
40 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.