spielwiese
Last change
on this file 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:
426 bytes
|
Line | |
---|
1 | LIB "tst.lib"; tst_init(); |
---|
2 | LIB "decodegb.lib"; |
---|
3 | //correct 2 errors in [7,3] 8-ary code RS code |
---|
4 | int t=2; int q=8; int n=7; int redun=4; |
---|
5 | ring r=(q,a),x,dp; |
---|
6 | matrix h_full=genMDSMat(n,a); |
---|
7 | matrix h=submat(h_full,1..redun,1..n); |
---|
8 | matrix g=dual_code(h); |
---|
9 | matrix x[1][3]=0,0,1,0; |
---|
10 | matrix y[1][7]=encode(x,g); |
---|
11 | print(y); |
---|
12 | //disturb with 2 errors |
---|
13 | matrix rec[1][7]=errorInsert(y,list(2,4),list(1,a)); |
---|
14 | print(rec); |
---|
15 | print(rec-y); |
---|
16 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.