24 December 2011 12:22:06 PM WALSH_PRB C++ version Test the WALSH library. TEST01 FWT computes a fast Walsh transform. I X(I) Y=FWT(X)/N Z=FWT(Y)/N 0 0.218418 0.409942 0.218418 1 0.956318 0.0169209 0.956318 2 0.829509 0.155189 0.829509 3 0.561695 0.0594335 0.561695 4 0.415307 -0.0325429 0.415307 5 0.0661187 -0.00875213 0.0661187 6 0.257578 -0.0391225 0.257578 7 0.109957 0.0263003 0.109957 8 0.043829 -0.134705 0.043829 9 0.633966 0.0341872 0.633966 10 0.0617272 -0.134611 0.0617272 11 0.449539 -0.0162994 0.449539 12 0.401306 -0.149183 0.401306 13 0.754673 0.0283209 0.754673 14 0.797287 0.0351619 0.797287 15 0.00183837 -0.0318215 0.00183837 I X(I) Y=FWT(X)/N Z=FWT(Y)/N 0 1 8.5 1 1 2 -4 2 2 3 0 3 3 4 -2 4 4 5 0 5 5 6 0 6 6 7 0 7 7 8 -1 8 8 9 0 9 9 10 0 10 10 11 0 11 11 12 0 12 12 13 0 13 13 14 0 14 14 15 0 15 15 16 -0.5 16 TEST02 WALSH computes a fast Walsh transform. I X(I) Y=FWT(X)/N Z=FWT(Y)/N 0 0.218418 0.409942 0.218418 1 0.956318 0.0169209 0.956318 2 0.829509 0.155189 0.829509 3 0.561695 0.0594335 0.561695 4 0.415307 -0.0325429 0.415307 5 0.0661187 -0.00875213 0.0661187 6 0.257578 -0.0391225 0.257578 7 0.109957 0.0263003 0.109957 8 0.043829 -0.134705 0.043829 9 0.633966 0.0341872 0.633966 10 0.0617272 -0.134611 0.0617272 11 0.449539 -0.0162994 0.449539 12 0.401306 -0.149183 0.401306 13 0.754673 0.0283209 0.754673 14 0.797287 0.0351619 0.797287 15 0.00183837 -0.0318215 0.00183837 I X(I) Y=FWT(X)/N Z=FWT(Y)/N 0 1 8.5 1 1 2 -4 2 2 3 0 3 3 4 -2 4 4 5 0 5 5 6 -0 6 6 7 0 7 7 8 -1 8 8 9 0 9 9 10 -0 10 10 11 0 11 11 12 -0 12 12 13 0 13 13 14 -0 14 14 15 0 15 15 16 -0.5 16 TEST03 HAAR computes a Haar transform. HNORM normalizes the transformed data. HAARIN computes an inverse Haar transform. I X(I) Y=HAAR(X) Z=HNORM(Y) W=HAARIN(Z) 0 0.218418 6.55907 0.409942 0.218418 1 0.956318 0.270735 0.0169209 0.956318 2 0.829509 1.71698 0.214623 0.829509 3 0.561695 -0.766044 -0.0957555 0.561695 4 0.415307 -0.216469 -0.0541172 0.415307 5 0.0661187 0.113891 0.0284728 0.0661187 6 0.257578 0.166529 0.0416321 0.257578 7 0.109957 0.356854 0.0892136 0.109957 8 0.043829 -0.737899 -0.36895 0.043829 9 0.633966 0.267814 0.133907 0.633966 10 0.0617272 0.349188 0.174594 0.0617272 11 0.449539 0.147621 0.0738105 0.449539 12 0.401306 -0.590137 -0.295068 0.401306 13 0.754673 -0.387812 -0.193906 0.754673 14 0.797287 -0.353367 -0.176684 0.797287 15 0.00183837 0.795449 0.397724 0.00183837 I X(I) Y=HAAR(X) Z=HNORM(Y) W=HAARIN(Z) 0 1 136 8.5 1 1 2 -64 -4 2 2 3 -16 -2 3 3 4 -16 -2 4 4 5 -4 -1 5 5 6 -4 -1 6 6 7 -4 -1 7 7 8 -4 -1 8 8 9 -1 -0.5 9 9 10 -1 -0.5 10 10 11 -1 -0.5 11 11 12 -1 -0.5 12 12 13 -1 -0.5 13 13 14 -1 -0.5 14 14 15 -1 -0.5 15 15 16 -1 -0.5 16 TEST04 FFWT computes a fast Walsh transform. I X(I) Y=FFWT(X)/N Z=FFWT(Y)/N 0 0.218418 0.409942 0.218418 1 0.956318 0.0169209 0.956318 2 0.829509 0.155189 0.829509 3 0.561695 0.0594335 0.561695 4 0.415307 -0.0325429 0.415307 5 0.0661187 -0.00875213 0.0661187 6 0.257578 -0.0391225 0.257578 7 0.109957 0.0263003 0.109957 8 0.043829 -0.134705 0.043829 9 0.633966 0.0341872 0.633966 10 0.0617272 -0.134611 0.0617272 11 0.449539 -0.0162994 0.449539 12 0.401306 -0.149183 0.401306 13 0.754673 0.0283209 0.754673 14 0.797287 0.0351619 0.797287 15 0.00183837 -0.0318215 0.00183837 I X(I) Y=FFWT(X)/N Z=FFWT(Y)/N 0 1 8.5 1 1 2 -4 2 2 3 0 3 3 4 -2 4 4 5 0 5 5 6 0 6 6 7 0 7 7 8 -1 8 8 9 0 9 9 10 0 10 10 11 0 11 11 12 0 12 12 13 0 13 13 14 0 14 14 15 0 15 15 16 -0.5 16 WALSH_PRB Normal end of execution. 24 December 2011 12:22:06 PM