source: git/Tst/Manual/sysQE.tst @ 7161aca

fieker-DuValspielwiese
Last change on this file since 7161aca was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 563 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "decodegb.lib";
3intvec v = option(get);
4//correct 2 errors in [7,3] 8-ary code RS code
5int t=2; int q=8; int n=7; int redun=4;
6ring r=(q,a),x,dp;
7matrix h_full=genMDSMat(n,a);
8matrix h=submat(h_full,1..redun,1..n);
9matrix g=dual_code(h);
10matrix x[1][3]=0,0,1,0;
11matrix y[1][7]=encode(x,g);
12//disturb with 2 errors
13matrix rec[1][7]=errorInsert(y,list(2,4),list(1,a));
14//generate the system
15def A=sysQE(h,rec,t);
16setring A;
17print(qe);
18//let us decode
19option(redSB);
20ideal sys_qe=std(qe);
21print(sys_qe);
22option(set,v);
23tst_status(1);$
Note: See TracBrowser for help on using the repository browser.