source: git/Tst/Short/methods.tst

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 
1LIB "tst.lib";
2tst_init();
3
4LIB "methods.lib";
5printlevel=0;
6
7
8HashTable H = hashTable(list("a","b","c"),list("aa","bb","cc"));
9H;
10
11HashTable H = hashTable(list("a","b","c"),list("aa","bb","cc"));
12selectKey(H,"b");
13H*"b";
14
15HashTable H = hashTable(list("a","b","c"),list("aa","bb","cc"));
16HashTable W = hashTable(list("d","e","f"),list("aa","bb","cc"));
17addHashTables(H,W);
18H+W;
19
20proc square(int i){return(i^2);};
21HashTable H1 = hashTable(list(list("int")),list("square"));
22Method m1 = method(H1);
23installMethod(m1,"tst");
24tst(2);
25proc kbase2(ideal I,int n){return(kbase(I,n));}
26HashTable H2 = hashTable(list(list("ideal","int")),list("kbase2"));
27Method m2=method(H2);
28Method m=m1+m2;
29installMethod(m,"tst");
30ring R=0,(x,y),dp;
31ideal I = x^3,y^7;
32I=std(I);
33tst(I,2);
34HashTable F = hashTable(list(list("int"),list("ideal","int")),list("square","kbase2"));
35Method m3 = method(F);
36installMethod(m3,"tst");
37tst(I,2);
38tst(3);
39
40tst_status(1);$
Note: See TracBrowser for help on using the repository browser.