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 | |
---|
1 | LIB "tst.lib"; tst_init(); |
---|
2 | LIB "decodegb.lib"; |
---|
3 | intvec v = option(get); |
---|
4 | //correct 2 errors in [7,3] 8-ary code RS code |
---|
5 | int t=2; int q=8; int n=7; int redun=4; |
---|
6 | ring r=(q,a),x,dp; |
---|
7 | matrix h_full=genMDSMat(n,a); |
---|
8 | matrix h=submat(h_full,1..redun,1..n); |
---|
9 | matrix g=dual_code(h); |
---|
10 | matrix x[1][3]=0,0,1,0; |
---|
11 | matrix y[1][7]=encode(x,g); |
---|
12 | //disturb with 2 errors |
---|
13 | matrix rec[1][7]=errorInsert(y,list(2,4),list(1,a)); |
---|
14 | //generate the system |
---|
15 | def A=sysQE(h,rec,t); |
---|
16 | setring A; |
---|
17 | print(qe); |
---|
18 | //let us decode |
---|
19 | option(redSB); |
---|
20 | ideal sys_qe=std(qe); |
---|
21 | print(sys_qe); |
---|
22 | option(set,v); |
---|
23 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.