summaryrefslogtreecommitdiff
path: root/lib/ldpc/peg/peg2alist
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2018-12-19 22:58:32 +0100
committerChristoph Berg <myon@debian.org>2018-12-19 22:58:32 +0100
commite0737c56c1e384e05064a0c6e1ac46979371041b (patch)
treea0123d694a2d36c43dabdf0a3907392fce11d457 /lib/ldpc/peg/peg2alist
parentb4aebf2d137b892f53503b13785ecae900062ff7 (diff)
New upstream version 2.0.0+repackupstream/2.0.0+repack
Diffstat (limited to 'lib/ldpc/peg/peg2alist')
-rwxr-xr-xlib/ldpc/peg/peg2alist37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/ldpc/peg/peg2alist b/lib/ldpc/peg/peg2alist
deleted file mode 100755
index da710f92..00000000
--- a/lib/ldpc/peg/peg2alist
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/opt/local/bin/octave -qf
-# read a parity check matrix produced by the peg algorithm and
-# convert to alist format so that it can be read using alist_to_pcheck
-arg_list=argv();
-filename=arg_list{1};
-fid=fopen(filename,"r");
-N=fscanf(fid,"%d",[1]);
-M=fscanf(fid,"%d",[1]);
-pcheck=zeros(M,N);
-max_bits_in_check=fscanf(fid,"%d",[1]);
-for i=1:M
- vec=fscanf(fid,"%d",[max_bits_in_check]);
- pcheck(i,vec(vec>0))=1;
-endfor
-
-max_bits_in_check2=max(sum(pcheck'));
-max_checks_per_bit=max(sum(pcheck));
-printf("%d %d\n",M,N);
-printf("%d %d\n",max_bits_in_check2,max_checks_per_bit);
-printf("%d ",sum(pcheck'));
-printf("\n");
-printf("%d ",sum(pcheck));
-printf("\n");
-for i=1:M
- vec=find(pcheck(i,:)>0);
- pr=zeros(1,max_bits_in_check2);
- pr(1:size(vec)(2))=vec;
- printf("%d ",pr);
- printf("\n");
-endfor
-for i=1:N
- vec=find(pcheck(:,i)>0);
- pr=zeros(1,max_checks_per_bit);
- pr(1:size(vec)(1))=vec;
- printf("%d ",pr)
- printf("\n");
-endfor