source: git/Tst/Manual/truncateFast.tst @ 42ea848

spielwiese
Last change on this file since 42ea848 was 6051d87, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
FIX: Manual examples need adaptation to be tests (due to HW/build-dependent output)
  • Property mode set to 100644
File size: 863 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "sheafcoh.lib";
3ring R=0,(x,y,z,u,v),dp;
4module M=maxideal(3);
5homog(M);
6// compute presentation matrix for truncated module (R/<x,y,z,u>^3)_(>=2)
7int t=timer;
8module M2t=truncate(M,2);
9t = timer - t;
10// "// Simple truncate: ", t;
11t=timer;
12module M2=truncateFast(std(M),2);
13t = timer - t;
14// "// Fast truncate: ", t;
15print(M2);
16"// Check: M2t == M2?: ", size(NF(M2, std(M2t))) + size(NF(M2t, std(M2)));
17dimGradedPart(M2,1);
18dimGradedPart(M2,2);
19// this should coincide with:
20dimGradedPart(M,2);
21// shift grading by 1:
22intvec v=1;
23attrib(M,"isHomog",v);
24t=timer;
25M2t=truncate(M,2);
26t = timer - t;
27// "// Simple truncate: ", t;
28t=timer;
29M2=truncateFast(std(M),2);
30t = timer - t;
31// "// Fast truncate: ", t;
32print(M2);
33"// Check: M2t == M2?: ", size(NF(M2, std(M2t))) + size(NF(M2t, std(M2))); //?
34dimGradedPart(M2,3);
35tst_status(1);$
Note: See TracBrowser for help on using the repository browser.