From faa0a7cf1fc2788a70a202b71315f992022040b5 Mon Sep 17 00:00:00 2001 From: WeileiZeng <240155787@qq.com> Date: Mon, 6 Apr 2020 20:01:27 -0700 Subject: [PATCH] finish comparison for toric code --- empty.log | 0 .../result/my-bp2-iteration0-cycle1000.gnudat | 53 + .../result/my-bp2-iteration0-cycle200.gnudat | 53 + gnuplot/toric_rate.gnu | 1 + makefile | 4 +- my_bp2.c | 358 + my_bp2.c~ | 350 + my_bp2.out | Bin 0 -> 226944 bytes readme.md | 2 +- run_my_bp2.sh | 4 + run_my_bp2.sh~ | 3 + std.log | 14058 ++++++++++++++-- test.c | 10 +- test.out | Bin 170472 -> 170632 bytes test.sh | 4 + test.sh~ | 4 + 16 files changed, 13476 insertions(+), 1428 deletions(-) create mode 100644 empty.log create mode 100644 gnuplot/result/my-bp2-iteration0-cycle1000.gnudat create mode 100644 gnuplot/result/my-bp2-iteration0-cycle200.gnudat create mode 100644 my_bp2.c create mode 100644 my_bp2.c~ create mode 100755 my_bp2.out create mode 100755 run_my_bp2.sh create mode 100755 run_my_bp2.sh~ create mode 100755 test.sh create mode 100755 test.sh~ diff --git a/empty.log b/empty.log new file mode 100644 index 0000000..e69de29 diff --git a/gnuplot/result/my-bp2-iteration0-cycle1000.gnudat b/gnuplot/result/my-bp2-iteration0-cycle1000.gnudat new file mode 100644 index 0000000..dcf29e9 --- /dev/null +++ b/gnuplot/result/my-bp2-iteration0-cycle1000.gnudat @@ -0,0 +1,53 @@ +#header +sizes: 13, 11, 9, 7, 5, + p, P_c converge rate, zero error vectors, weight one error, weight 2 error +0.100000 0.001000 0.000000 0.000000 0.000000 0.100000 0.007000 0.000000 0.000000 0.000000 0.100000 0.033500 0.000000 0.000000 0.000000 0.100000 0.132000 0.000000 0.000000 0.000000 0.100000 0.363500 0.000000 0.000000 0.000000 +0.079433 0.012500 0.000000 0.000000 0.000000 0.079433 0.039500 0.000000 0.000000 0.000000 0.079433 0.119000 0.000000 0.000000 0.000000 0.079433 0.261500 0.000000 0.000000 0.000000 0.079433 0.517000 0.000000 0.000000 0.000000 +0.063096 0.051000 0.000000 0.000000 0.000000 0.063096 0.137000 0.000000 0.000000 0.000000 0.063096 0.268500 0.000000 0.000000 0.000000 0.063096 0.430500 0.000000 0.000000 0.000000 0.063096 0.649000 0.000000 0.000000 0.000000 +0.050119 0.159500 0.000000 0.000000 0.000000 0.050119 0.264000 0.000000 0.000000 0.000000 0.050119 0.436500 0.000000 0.000000 0.000000 0.050119 0.589000 0.000000 0.000000 0.000000 0.050119 0.782000 0.000000 0.000000 0.000000 +0.039811 0.312500 0.000000 0.000000 0.000000 0.039811 0.447000 0.000000 0.000000 0.000000 0.039811 0.572500 0.000000 0.000000 0.000000 0.039811 0.724000 0.000000 0.000000 0.000000 0.039811 0.847000 0.000000 0.000000 0.000000 +0.031623 0.441500 0.000000 0.000000 0.000000 0.031623 0.553000 0.000000 0.000000 0.000000 0.031623 0.663000 0.000000 0.000000 0.000000 0.031623 0.773500 0.000000 0.000000 0.000000 0.031623 0.877500 0.000000 0.000000 0.000000 +0.025119 0.571500 0.000000 0.000000 0.000000 0.025119 0.692000 0.000000 0.000000 0.000000 0.025119 0.791000 0.000000 0.000000 0.000000 0.025119 0.865500 0.000000 0.000000 0.000000 0.025119 0.923000 0.000000 0.000000 0.000000 +0.019953 0.683500 0.000000 0.000000 0.000000 0.019953 0.773500 0.000000 0.000000 0.000000 0.019953 0.850500 0.000000 0.000000 0.000000 0.019953 0.912500 0.000000 0.000000 0.000000 0.019953 0.950500 0.000000 0.000000 0.000000 +0.015849 0.802500 0.000000 0.000000 0.000000 0.015849 0.834000 0.000000 0.000000 0.000000 0.015849 0.893000 0.000000 0.000000 0.000000 0.015849 0.938000 0.000000 0.000000 0.000000 0.015849 0.964000 0.000000 0.000000 0.000000 +0.012589 0.863000 0.000000 0.000000 0.000000 0.012589 0.889000 0.000000 0.000000 0.000000 0.012589 0.939000 0.000000 0.000000 0.000000 0.012589 0.958000 0.000000 0.000000 0.000000 0.012589 0.976500 0.000000 0.000000 0.000000 +0.010000 0.924500 0.000000 0.000000 0.000000 0.010000 0.948500 0.000000 0.000000 0.000000 0.010000 0.953000 0.000000 0.000000 0.000000 0.010000 0.968000 0.000000 0.000000 0.000000 0.010000 0.987000 0.000000 0.000000 0.000000 +0.007943 0.939500 0.000000 0.000000 0.000000 0.007943 0.954500 0.000000 0.000000 0.000000 0.007943 0.966500 0.000000 0.000000 0.000000 0.007943 0.979000 0.000000 0.000000 0.000000 0.007943 0.992500 0.000000 0.000000 0.000000 +0.006310 0.957500 0.000000 0.000000 0.000000 0.006310 0.966500 0.000000 0.000000 0.000000 0.006310 0.975000 0.000000 0.000000 0.000000 0.006310 0.987500 0.000000 0.000000 0.000000 0.006310 0.994000 0.000000 0.000000 0.000000 +0.005012 0.975000 0.000000 0.000000 0.000000 0.005012 0.984000 0.000000 0.000000 0.000000 0.005012 0.983500 0.000000 0.000000 0.000000 0.005012 0.994500 0.000000 0.000000 0.000000 0.005012 0.998500 0.000000 0.000000 0.000000 +0.003981 0.981500 0.000000 0.000000 0.000000 0.003981 0.986500 0.000000 0.000000 0.000000 0.003981 0.989500 0.000000 0.000000 0.000000 0.003981 0.994000 0.000000 0.000000 0.000000 0.003981 0.997000 0.000000 0.000000 0.000000 +0.003162 0.991000 0.000000 0.000000 0.000000 0.003162 0.992000 0.000000 0.000000 0.000000 0.003162 0.996500 0.000000 0.000000 0.000000 0.003162 0.998500 0.000000 0.000000 0.000000 0.003162 0.997500 0.000000 0.000000 0.000000 +0.002512 0.992500 0.000000 0.000000 0.000000 0.002512 0.995500 0.000000 0.000000 0.000000 0.002512 0.998000 0.000000 0.000000 0.000000 0.002512 0.998500 0.000000 0.000000 0.000000 0.002512 0.999000 0.000000 0.000000 0.000000 +0.001995 0.994500 0.000000 0.000000 0.000000 0.001995 0.996500 0.000000 0.000000 0.000000 0.001995 0.999000 0.000000 0.000000 0.000000 0.001995 0.999500 0.000000 0.000000 0.000000 0.001995 0.999500 0.000000 0.000000 0.000000 +0.001585 0.997500 0.000000 0.000000 0.000000 0.001585 0.999500 0.000000 0.000000 0.000000 0.001585 0.999500 0.000000 0.000000 0.000000 0.001585 0.999000 0.000000 0.000000 0.000000 0.001585 1.000000 0.000000 0.000000 0.000000 +0.001259 0.999500 0.000000 0.000000 0.000000 0.001259 1.000000 0.000000 0.000000 0.000000 0.001259 0.999500 0.000000 0.000000 0.000000 0.001259 0.999500 0.000000 0.000000 0.000000 0.001259 1.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 diff --git a/gnuplot/result/my-bp2-iteration0-cycle200.gnudat b/gnuplot/result/my-bp2-iteration0-cycle200.gnudat new file mode 100644 index 0000000..297c2bc --- /dev/null +++ b/gnuplot/result/my-bp2-iteration0-cycle200.gnudat @@ -0,0 +1,53 @@ +#header +sizes: 13, 11, 9, 7, 5, + p, P_c converge rate, zero error vectors, weight one error, weight 2 error +0.100000 0.000000 0.000000 0.000000 0.000000 0.100000 0.000000 0.000000 0.000000 0.000000 0.100000 0.050000 0.000000 0.000000 0.000000 0.100000 0.130000 0.000000 0.000000 0.000000 0.100000 0.300000 0.000000 0.000000 0.000000 +0.079433 0.020000 0.000000 0.000000 0.000000 0.079433 0.050000 0.000000 0.000000 0.000000 0.079433 0.150000 0.000000 0.000000 0.000000 0.079433 0.280000 0.000000 0.000000 0.000000 0.079433 0.490000 0.000000 0.000000 0.000000 +0.063096 0.080000 0.000000 0.000000 0.000000 0.063096 0.185000 0.000000 0.000000 0.000000 0.063096 0.265000 0.000000 0.000000 0.000000 0.063096 0.455000 0.000000 0.000000 0.000000 0.063096 0.685000 0.000000 0.000000 0.000000 +0.050119 0.165000 0.000000 0.000000 0.000000 0.050119 0.275000 0.000000 0.000000 0.000000 0.050119 0.420000 0.000000 0.000000 0.000000 0.050119 0.575000 0.000000 0.000000 0.000000 0.050119 0.795000 0.000000 0.000000 0.000000 +0.039811 0.390000 0.000000 0.000000 0.000000 0.039811 0.445000 0.000000 0.000000 0.000000 0.039811 0.560000 0.000000 0.000000 0.000000 0.039811 0.785000 0.000000 0.000000 0.000000 0.039811 0.805000 0.000000 0.000000 0.000000 +0.031623 0.410000 0.000000 0.000000 0.000000 0.031623 0.570000 0.000000 0.000000 0.000000 0.031623 0.700000 0.000000 0.000000 0.000000 0.031623 0.785000 0.000000 0.000000 0.000000 0.031623 0.855000 0.000000 0.000000 0.000000 +0.025119 0.595000 0.000000 0.000000 0.000000 0.025119 0.680000 0.000000 0.000000 0.000000 0.025119 0.725000 0.000000 0.000000 0.000000 0.025119 0.885000 0.000000 0.000000 0.000000 0.025119 0.920000 0.000000 0.000000 0.000000 +0.019953 0.725000 0.000000 0.000000 0.000000 0.019953 0.750000 0.000000 0.000000 0.000000 0.019953 0.860000 0.000000 0.000000 0.000000 0.019953 0.930000 0.000000 0.000000 0.000000 0.019953 0.960000 0.000000 0.000000 0.000000 +0.015849 0.805000 0.000000 0.000000 0.000000 0.015849 0.855000 0.000000 0.000000 0.000000 0.015849 0.905000 0.000000 0.000000 0.000000 0.015849 0.940000 0.000000 0.000000 0.000000 0.015849 0.960000 0.000000 0.000000 0.000000 +0.012589 0.870000 0.000000 0.000000 0.000000 0.012589 0.910000 0.000000 0.000000 0.000000 0.012589 0.960000 0.000000 0.000000 0.000000 0.012589 0.970000 0.000000 0.000000 0.000000 0.012589 0.970000 0.000000 0.000000 0.000000 +0.010000 0.900000 0.000000 0.000000 0.000000 0.010000 0.900000 0.000000 0.000000 0.000000 0.010000 0.940000 0.000000 0.000000 0.000000 0.010000 0.960000 0.000000 0.000000 0.000000 0.010000 0.990000 0.000000 0.000000 0.000000 +0.007943 0.925000 0.000000 0.000000 0.000000 0.007943 0.955000 0.000000 0.000000 0.000000 0.007943 0.955000 0.000000 0.000000 0.000000 0.007943 0.985000 0.000000 0.000000 0.000000 0.007943 0.990000 0.000000 0.000000 0.000000 +0.006310 0.960000 0.000000 0.000000 0.000000 0.006310 0.970000 0.000000 0.000000 0.000000 0.006310 0.980000 0.000000 0.000000 0.000000 0.006310 0.995000 0.000000 0.000000 0.000000 0.006310 1.000000 0.000000 0.000000 0.000000 +0.005012 0.965000 0.000000 0.000000 0.000000 0.005012 0.980000 0.000000 0.000000 0.000000 0.005012 0.975000 0.000000 0.000000 0.000000 0.005012 0.995000 0.000000 0.000000 0.000000 0.005012 1.000000 0.000000 0.000000 0.000000 +0.003981 0.985000 0.000000 0.000000 0.000000 0.003981 0.995000 0.000000 0.000000 0.000000 0.003981 0.995000 0.000000 0.000000 0.000000 0.003981 0.990000 0.000000 0.000000 0.000000 0.003981 1.000000 0.000000 0.000000 0.000000 +0.003162 0.990000 0.000000 0.000000 0.000000 0.003162 0.980000 0.000000 0.000000 0.000000 0.003162 0.990000 0.000000 0.000000 0.000000 0.003162 1.000000 0.000000 0.000000 0.000000 0.003162 0.995000 0.000000 0.000000 0.000000 +0.002512 0.990000 0.000000 0.000000 0.000000 0.002512 1.000000 0.000000 0.000000 0.000000 0.002512 1.000000 0.000000 0.000000 0.000000 0.002512 1.000000 0.000000 0.000000 0.000000 0.002512 1.000000 0.000000 0.000000 0.000000 +0.001995 1.000000 0.000000 0.000000 0.000000 0.001995 0.990000 0.000000 0.000000 0.000000 0.001995 1.000000 0.000000 0.000000 0.000000 0.001995 1.000000 0.000000 0.000000 0.000000 0.001995 1.000000 0.000000 0.000000 0.000000 +0.001585 0.990000 0.000000 0.000000 0.000000 0.001585 0.995000 0.000000 0.000000 0.000000 0.001585 1.000000 0.000000 0.000000 0.000000 0.001585 1.000000 0.000000 0.000000 0.000000 0.001585 1.000000 0.000000 0.000000 0.000000 +0.001259 1.000000 0.000000 0.000000 0.000000 0.001259 1.000000 0.000000 0.000000 0.000000 0.001259 1.000000 0.000000 0.000000 0.000000 0.001259 1.000000 0.000000 0.000000 0.000000 0.001259 1.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 diff --git a/gnuplot/toric_rate.gnu b/gnuplot/toric_rate.gnu index 1e93598..fd027da 100755 --- a/gnuplot/toric_rate.gnu +++ b/gnuplot/toric_rate.gnu @@ -6,6 +6,7 @@ data_folder='result' #data_title='data-cycle100' #data_title='iteration10-cycle1000' data_title='iteration0-cycle1000' +data_title='my-bp2-iteration0-cycle200' plot_title='-weight' plot_title='' diff --git a/makefile b/makefile index be885b9..b21c4c0 100644 --- a/makefile +++ b/makefile @@ -32,6 +32,8 @@ bp_decoding4.out:bp_decoding4.c $(files) $(command) my_bp1.out:my_bp1.c $(files) $(command) +my_bp2.out:my_bp2.c $(files) + $(command) #bp_decoding3.out:bp_decoding3.c mm_read.c mm_read.h mmio.c mmio.h mm_write.c mm_write.h lib.cpp lib.h my_lib.h makefile bp_decoding3.out:bp_decoding3.c $(files) $(command) @@ -43,7 +45,7 @@ convert_data.out:convert_data.c $(files) # g++ -std=c++11 -pthread -o test.out test.c test.out:test.c $(files) $(command) - ./test.out +# ./test.out # $(CXX) $(START) -o $@ $< $(word 2,$^) $(word 4, $^) $(word 6, $^) $(END) error_analysis.out:error_analysis.c mm_read.c mm_read.h mmio.c mmio.h mm_write.c mm_write.h my_lib.h $(CXX) $(START) -o $@ $< $(word 2,$^) $(word 4, $^) $(word 6, $^) $(END) diff --git a/my_bp2.c b/my_bp2.c new file mode 100644 index 0000000..fe09f5f --- /dev/null +++ b/my_bp2.c @@ -0,0 +1,358 @@ +//Weilei Apr 6, 2020 +// copied from my_bp1.c +#include +#include +#include +#include +#include +#include +#include +#include "my_lib.h" +#include +using namespace std; +using namespace itpp; + + + +// Read the code from files and do BP decoding +//input:source file for stabilzier matrix; error propability p ; + +int decode( GF2mat G, GF2mat H, double p, mat * data, int col_index, int row_index); + +int main(int argc, char **argv){ + Parser parser; + parser.init(argc,argv); + //p.set_silentmode(true); + string filename_G, filename_H, filename_result; + //parser.get(filename_G,"filename_G"); + //parser.get(filename_H,"filename_H"); + //parser.get(filename_result,"filename_result"); + + vector> pool; + vector>::size_type pool_size=15; //max number of threads, 15 with decreasing size for best performace + std::chrono::milliseconds span (100); + //change parameter p, code size + //char * filename_result=argv[3];//prefix for the file + double p; + //parser.get(p,"p"); + int sizes[]= {13,11,9,7,5}; + string stabilizer_folder="data/toric/stabilizer"; + //string error_folder="data/toric/bp_decoding4"; + mat data(50,5*5); //return result in a mat, 5 columns for each size. format defines in header + data.zeros(); + int col_index=-5; + for ( int size : sizes){ + // cout<<"size = "< -3;ip-=0.1){ + //cout<<"ip = "<= pool_size ){ + //wait until some of them finish + //break; + for(vector > :: iterator it = pool.begin(); it != pool.end(); ++it){ + //printf("%d", *it); + if ( it->wait_for(span) == future_status::ready){ + cout<<"."<0){ + cout<0){ + break; + } + // usleep(100000); + //cout<<"iteration: "<=0){ + if ( current_iteration < 0 ){ + //cout< +using namespace std; +using namespace itpp; + + + +// Read the code from files and do BP decoding +//input:source file for stabilzier matrix; error propability p ; + +int decode( GF2mat G, GF2mat H, double p, mat * data, int col_index, int row_index); + +int main(int argc, char **argv){ + Parser parser; + parser.init(argc,argv); + //p.set_silentmode(true); + string filename_G, filename_H, filename_result; + //parser.get(filename_G,"filename_G"); + //parser.get(filename_H,"filename_H"); + //parser.get(filename_result,"filename_result"); + + vector> pool; + vector>::size_type pool_size=15; //max number of threads, 15 with decreasing size for best performace + std::chrono::milliseconds span (100); + //change parameter p, code size + //char * filename_result=argv[3];//prefix for the file + double p; + //parser.get(p,"p"); + int sizes[]= {13,11,9,7,5}; + string stabilizer_folder="data/toric/stabilizer"; + //string error_folder="data/toric/bp_decoding4"; + mat data(50,5*5); //return result in a mat, 5 columns for each size. format defines in header + data.zeros(); + int col_index=-5; + for ( int size : sizes){ + // cout<<"size = "< -3;ip-=0.1){ + //cout<<"ip = "<= pool_size ){ + //wait until some of them finish + //break; + for(vector > :: iterator it = pool.begin(); it != pool.end(); ++it){ + //printf("%d", *it); + if ( it->wait_for(span) == future_status::ready){ + cout<<"."<0){ + cout<0){ + break; + } + // usleep(100000); + //cout<<"iteration: "<=0){ + if ( current_iteration < 0 ){ + //cout<