// ISO C++14 Standard#include<iostream>#include<vector>#include<string>#include<unordered_map>#include<cmath>#include<fstream>#include<iomanip>#include<random>#include<cstddef>#include<algorithm>#include<stdexcept>#include<limits>#ifndef M_PI#define M_PI 3.14159265358979323846#endifstruct WaveletCoeffs { const double* dec_lo; std::size_t dec_lo_len; const double* dec_hi; std::size_t dec_hi_len; const double* rec_lo; std::size_t rec_lo_len; const double* rec_hi; std::size_t rec_hi_len;};// 小波系数数据库(封装在命名空间中)namespace WaveletDatabase { static const double wv_db2_dec_lo[] = { -0.12940952255126037, 0.22414386804201339, 0.83651630373780794, 0.48296291314453416 }; static const std::size_t wv_db2_dec_lo_len = 4; static const double wv_db2_dec_hi[] = { -0.48296291314453416, 0.83651630373780794, -0.22414386804201339, -0.12940952255126037 }; static const std::size_t wv_db2_dec_hi_len = 4; static const double wv_db2_rec_lo[] = { 0.48296291314453416, 0.83651630373780794, 0.22414386804201339, -0.12940952255126037 }; static const std::size_t wv_db2_rec_lo_len = 4; static const double wv_db2_rec_hi[] = { -0.12940952255126037, -0.22414386804201339, 0.83651630373780794, -0.48296291314453416 }; static const std::size_t wv_db2_rec_hi_len = 4; static const double wv_db4_dec_lo[] = { -0.010597401785069032, 0.032883011666885197, 0.030841381835560764, -0.18703481171909309, -0.027983769416859854, 0.63088076792985892, 0.71484657055291567, 0.23037781330889651 }; static const std::size_t wv_db4_dec_lo_len = 8; static const double wv_db4_dec_hi[] = { -0.23037781330889651, 0.71484657055291567, -0.63088076792985892, -0.027983769416859854, 0.18703481171909309, 0.030841381835560764, -0.032883011666885197, -0.010597401785069032 }; static const std::size_t wv_db4_dec_hi_len = 8; static const double wv_db4_rec_lo[] = { 0.23037781330889651, 0.71484657055291567, 0.63088076792985892, -0.027983769416859854, -0.18703481171909309, 0.030841381835560764, 0.032883011666885197, -0.010597401785069032 }; static const std::size_t wv_db4_rec_lo_len = 8; static const double wv_db4_rec_hi[] = { -0.010597401785069032, -0.032883011666885197, 0.030841381835560764, 0.18703481171909309, -0.027983769416859854, -0.63088076792985892, 0.71484657055291567, -0.23037781330889651 }; static const std::size_t wv_db4_rec_hi_len = 8; static const double wv_db8_dec_lo[] = { -0.00011747678412476953, 0.00067544940645056933, -0.00039174037337694705, -0.0048703529934515741, 0.0087460940474057766, 0.013981027917398282, -0.044088253930794755, -0.017369301001807547, 0.12874742662047847, 0.00047248457391328279, -0.28401554296154691, -0.015829105256349306, 0.58535468365420673, 0.67563073629728976, 0.31287159091429995, 0.054415842243104008 }; static const std::size_t wv_db8_dec_lo_len = 16; static const double wv_db8_dec_hi[] = { -0.054415842243104008, 0.31287159091429995, -0.67563073629728976, 0.58535468365420673, 0.015829105256349306, -0.28401554296154691, -0.00047248457391328279, 0.12874742662047847, 0.017369301001807547, -0.044088253930794755, -0.013981027917398282, 0.0087460940474057766, 0.0048703529934515741, -0.00039174037337694705, -0.00067544940645056933, -0.00011747678412476953 }; static const std::size_t wv_db8_dec_hi_len = 16; static const double wv_db8_rec_lo[] = { 0.054415842243104008, 0.31287159091429995, 0.67563073629728976, 0.58535468365420673, -0.015829105256349306, -0.28401554296154691, 0.00047248457391328279, 0.12874742662047847, -0.017369301001807547, -0.044088253930794755, 0.013981027917398282, 0.0087460940474057766, -0.0048703529934515741, -0.00039174037337694705, 0.00067544940645056933, -0.00011747678412476953 }; static const std::size_t wv_db8_rec_lo_len = 16; static const double wv_db8_rec_hi[] = { -0.00011747678412476953, -0.00067544940645056933, -0.00039174037337694705, 0.0048703529934515741, 0.0087460940474057766, -0.013981027917398282, -0.044088253930794755, 0.017369301001807547, 0.12874742662047847, -0.00047248457391328279, -0.28401554296154691, 0.015829105256349306, 0.58535468365420673, -0.67563073629728976, 0.31287159091429995, -0.054415842243104008 }; static const std::size_t wv_db8_rec_hi_len = 16; static const double wv_db10_dec_lo[] = { -1.3264202894521244e-05, 9.3588670320069592e-05, -0.00011646685512928545, -0.00068585669495971162, 0.0019924052951850561, 0.0013953517470529011, -0.010733175483330575, 0.0036065535669561697, 0.033212674059341002, -0.029457536821875813, -0.071394147166397082, 0.093057364603572348, 0.12736934033579325, -0.19594627437737705, -0.24984642432731538, 0.28117234366057747, 0.68845903945360354, 0.52720118893172563, 0.1881768000776915, 0.026670057900555554 }; static const std::size_t wv_db10_dec_lo_len = 20; static const double wv_db10_dec_hi[] = { -0.026670057900555554, 0.1881768000776915, -0.52720118893172563, 0.68845903945360354, -0.28117234366057747, -0.24984642432731538, 0.19594627437737705, 0.12736934033579325, -0.093057364603572348, -0.071394147166397082, 0.029457536821875813, 0.033212674059341002, -0.0036065535669561697, -0.010733175483330575, -0.0013953517470529011, 0.0019924052951850561, 0.00068585669495971162, -0.00011646685512928545, -9.3588670320069592e-05, -1.3264202894521244e-05 }; static const std::size_t wv_db10_dec_hi_len = 20; static const double wv_db10_rec_lo[] = { 0.026670057900555554, 0.1881768000776915, 0.52720118893172563, 0.68845903945360354, 0.28117234366057747, -0.24984642432731538, -0.19594627437737705, 0.12736934033579325, 0.093057364603572348, -0.071394147166397082, -0.029457536821875813, 0.033212674059341002, 0.0036065535669561697, -0.010733175483330575, 0.0013953517470529011, 0.0019924052951850561, -0.00068585669495971162, -0.00011646685512928545, 9.3588670320069592e-05, -1.3264202894521244e-05 }; static const std::size_t wv_db10_rec_lo_len = 20; static const double wv_db10_rec_hi[] = { -1.3264202894521244e-05, -9.3588670320069592e-05, -0.00011646685512928545, 0.00068585669495971162, 0.0019924052951850561, -0.0013953517470529011, -0.010733175483330575, -0.0036065535669561697, 0.033212674059341002, 0.029457536821875813, -0.071394147166397082, -0.093057364603572348, 0.12736934033579325, 0.19594627437737705, -0.24984642432731538, -0.28117234366057747, 0.68845903945360354, -0.52720118893172563, 0.1881768000776915, -0.026670057900555554 }; static const std::size_t wv_db10_rec_hi_len = 20; static const double wv_db12_dec_lo[] = { -1.5290717580685109e-06, 1.2776952219379767e-05, -2.4241545757030785e-05, -8.850410920820432e-05, 0.00038865306282093143, 6.5451282125095959e-06, -0.0021795036186277603, 0.0022486072409952378, 0.0067114990087955096, -0.012840825198300683, -0.01221864906974828, 0.041546277495084438, 0.010849130255822185, -0.096432120096507076, 0.0053595696743521503, 0.18247860592757967, -0.023779257256069726, -0.31617845375278553, -0.044763885653774628, 0.51588647842781565, 0.65719872257930712, 0.37735513521421266, 0.10956627282118515, 0.013112257957229518 }; static const std::size_t wv_db12_dec_lo_len = 24; static const double wv_db12_dec_hi[] = { -0.013112257957229518, 0.10956627282118515, -0.37735513521421266, 0.65719872257930712, -0.51588647842781565, -0.044763885653774628, 0.31617845375278553, -0.023779257256069726, -0.18247860592757967, 0.0053595696743521503, 0.096432120096507076, 0.010849130255822185, -0.041546277495084438, -0.01221864906974828, 0.012840825198300683, 0.0067114990087955096, -0.0022486072409952378, -0.0021795036186277603, -6.5451282125095959e-06, 0.00038865306282093143, 8.850410920820432e-05, -2.4241545757030785e-05, -1.2776952219379767e-05, -1.5290717580685109e-06 }; static const std::size_t wv_db12_dec_hi_len = 24; static const double wv_db12_rec_lo[] = { 0.013112257957229518, 0.10956627282118515, 0.37735513521421266, 0.65719872257930712, 0.51588647842781565, -0.044763885653774628, -0.31617845375278553, -0.023779257256069726, 0.18247860592757967, 0.0053595696743521503, -0.096432120096507076, 0.010849130255822185, 0.041546277495084438, -0.01221864906974828, -0.012840825198300683, 0.0067114990087955096, 0.0022486072409952378, -0.0021795036186277603, 6.5451282125095959e-06, 0.00038865306282093143, -8.850410920820432e-05, -2.4241545757030785e-05, 1.2776952219379767e-05, -1.5290717580685109e-06 }; static const std::size_t wv_db12_rec_lo_len = 24; static const double wv_db12_rec_hi[] = { -1.5290717580685109e-06, -1.2776952219379767e-05, -2.4241545757030785e-05, 8.850410920820432e-05, 0.00038865306282093143, -6.5451282125095959e-06, -0.0021795036186277603, -0.0022486072409952378, 0.0067114990087955096, 0.012840825198300683, -0.01221864906974828, -0.041546277495084438, 0.010849130255822185, 0.096432120096507076, 0.0053595696743521503, -0.18247860592757967, -0.023779257256069726, 0.31617845375278553, -0.044763885653774628, -0.51588647842781565, 0.65719872257930712, -0.37735513521421266, 0.10956627282118515, -0.013112257957229518 }; static const std::size_t wv_db12_rec_hi_len = 24; static const double wv_db14_dec_lo[] = { -1.7871399683113592e-07, 1.7249946753678127e-06, -4.3897049017813942e-06, -1.0337209184570774e-05, 6.8755042526975093e-05, -4.1777245770372596e-05, -0.0003868319473129545, 0.00070802115423552786, 0.0010616910856067619, -0.0038496388680221874, -0.00074621898926838497, 0.012789493266333409, -0.0056150495303569593, -0.030185351540390634, 0.026981408307912916, 0.055237126259216042, -0.071548955504046136, -0.086748411568169689, 0.1399890165844607, 0.1383952138648066, -0.21803352999327605, -0.27168855227874805, 0.21867068775890652, 0.63118784910485681, 0.55430561794089384, 0.25485026779262138, 0.062364758849398898, 0.0064611534600879476 }; static const std::size_t wv_db14_dec_lo_len = 28; static const double wv_db14_dec_hi[] = { -0.0064611534600879476, 0.062364758849398898, -0.25485026779262138, 0.55430561794089384, -0.63118784910485681, 0.21867068775890652, 0.27168855227874805, -0.21803352999327605, -0.1383952138648066, 0.1399890165844607, 0.086748411568169689, -0.071548955504046136, -0.055237126259216042, 0.026981408307912916, 0.030185351540390634, -0.0056150495303569593, -0.012789493266333409, -0.00074621898926838497, 0.0038496388680221874, 0.0010616910856067619, -0.00070802115423552786, -0.0003868319473129545, 4.1777245770372596e-05, 6.8755042526975093e-05, 1.0337209184570774e-05, -4.3897049017813942e-06, -1.7249946753678127e-06, -1.7871399683113592e-07 }; static const std::size_t wv_db14_dec_hi_len = 28; static const double wv_db14_rec_lo[] = { 0.0064611534600879476, 0.062364758849398898, 0.25485026779262138, 0.55430561794089384, 0.63118784910485681, 0.21867068775890652, -0.27168855227874805, -0.21803352999327605, 0.1383952138648066, 0.1399890165844607, -0.086748411568169689, -0.071548955504046136, 0.055237126259216042, 0.026981408307912916, -0.030185351540390634, -0.0056150495303569593, 0.012789493266333409, -0.00074621898926838497, -0.0038496388680221874, 0.0010616910856067619, 0.00070802115423552786, -0.0003868319473129545, -4.1777245770372596e-05, 6.8755042526975093e-05, -1.0337209184570774e-05, -4.3897049017813942e-06, 1.7249946753678127e-06, -1.7871399683113592e-07 }; static const std::size_t wv_db14_rec_lo_len = 28; static const double wv_db14_rec_hi[] = { -1.7871399683113592e-07, -1.7249946753678127e-06, -4.3897049017813942e-06, 1.0337209184570774e-05, 6.8755042526975093e-05, 4.1777245770372596e-05, -0.0003868319473129545, -0.00070802115423552786, 0.0010616910856067619, 0.0038496388680221874, -0.00074621898926838497, -0.012789493266333409, -0.0056150495303569593, 0.030185351540390634, 0.026981408307912916, -0.055237126259216042, -0.071548955504046136, 0.086748411568169689, 0.1399890165844607, -0.1383952138648066, -0.21803352999327605, 0.27168855227874805, 0.21867068775890652, -0.63118784910485681, 0.55430561794089384, -0.25485026779262138, 0.062364758849398898, -0.0064611534600879476 }; static const std::size_t wv_db14_rec_hi_len = 28; static const double wv_db16_dec_lo[] = { -2.1093396301007431e-08, 2.3087840868575457e-07, -7.3636567854512051e-07, -1.0435713423116066e-06, 1.1336608661276258e-05, -1.3945668988208893e-05, -6.103596621410936e-05, 0.00017478724522533817, 0.00011424152003872239, -0.00094102174935956756, 0.00040789698084971285, 0.003128023381206269, -0.0036442796214983899, -0.0069900145634139163, 0.013993768859828731, 0.01029765964095597, -0.036888397691730142, -0.0075889743688577378, 0.075924236044276311, -0.006239722752474872, -0.1323883055638104, 0.027340263752716042, 0.2111906939471043, -0.027918208133028276, -0.32706331052791771, -0.089751089402489645, 0.44029025688635692, 0.63735633208378895, 0.4303127228460038, 0.16506428348885313, 0.034907714323673344, 0.0031892209253477381 }; static const std::size_t wv_db16_dec_lo_len = 32; static const double wv_db16_dec_hi[] = { -0.0031892209253477381, 0.034907714323673344, -0.16506428348885313, 0.4303127228460038, -0.63735633208378895, 0.44029025688635692, 0.089751089402489645, -0.32706331052791771, 0.027918208133028276, 0.2111906939471043, -0.027340263752716042, -0.1323883055638104, 0.006239722752474872, 0.075924236044276311, 0.0075889743688577378, -0.036888397691730142, -0.01029765964095597, 0.013993768859828731, 0.0069900145634139163, -0.0036442796214983899, -0.003128023381206269, 0.00040789698084971285, 0.00094102174935956756, 0.00011424152003872239, -0.00017478724522533817, -6.103596621410936e-05, 1.3945668988208893e-05, 1.1336608661276258e-05, 1.0435713423116066e-06, -7.3636567854512051e-07, -2.3087840868575457e-07, -2.1093396301007431e-08 }; static const std::size_t wv_db16_dec_hi_len = 32; static const double wv_db16_rec_lo[] = { 0.0031892209253477381, 0.034907714323673344, 0.16506428348885313, 0.4303127228460038, 0.63735633208378895, 0.44029025688635692, -0.089751089402489645, -0.32706331052791771, -0.027918208133028276, 0.2111906939471043, 0.027340263752716042, -0.1323883055638104, -0.006239722752474872, 0.075924236044276311, -0.0075889743688577378, -0.036888397691730142, 0.01029765964095597, 0.013993768859828731, -0.0069900145634139163, -0.0036442796214983899, 0.003128023381206269, 0.00040789698084971285, -0.00094102174935956756, 0.00011424152003872239, 0.00017478724522533817, -6.103596621410936e-05, -1.3945668988208893e-05, 1.1336608661276258e-05, -1.0435713423116066e-06, -7.3636567854512051e-07, 2.3087840868575457e-07, -2.1093396301007431e-08 }; static const std::size_t wv_db16_rec_lo_len = 32; static const double wv_db16_rec_hi[] = { -2.1093396301007431e-08, -2.3087840868575457e-07, -7.3636567854512051e-07, 1.0435713423116066e-06, 1.1336608661276258e-05, 1.3945668988208893e-05, -6.103596621410936e-05, -0.00017478724522533817, 0.00011424152003872239, 0.00094102174935956756, 0.00040789698084971285, -0.003128023381206269, -0.0036442796214983899, 0.0069900145634139163, 0.013993768859828731, -0.01029765964095597, -0.036888397691730142, 0.0075889743688577378, 0.075924236044276311, 0.006239722752474872, -0.1323883055638104, -0.027340263752716042, 0.2111906939471043, 0.027918208133028276, -0.32706331052791771, 0.089751089402489645, 0.44029025688635692, -0.63735633208378895, 0.4303127228460038, -0.16506428348885313, 0.034907714323673344, -0.0031892209253477381 }; static const std::size_t wv_db16_rec_hi_len = 32; static const double wv_db18_dec_lo[] = { -2.5079344549485983e-09, 3.0688358630451749e-08, -1.1760987670282317e-07, -7.6916326898851766e-08, 1.7687129836276155e-06, -3.332634478885822e-06, -8.5206025374466959e-06, 3.7412378807400385e-05, -1.5359171235347246e-07, -0.00019864855231174796, 0.0002135815619103407, 0.00062846568296514574, -0.0013405962983361066, -0.0011187326669924971, 0.0049433436054667377, 0.00011863003385811746, -0.013051480946612001, 0.0062621679543057073, 0.026670705926470591, -0.023733210395860002, -0.044526141902982326, 0.057051247738536884, 0.064887216211905449, -0.10675224665982849, -0.092331884150846283, 0.16708131276325741, 0.14953397556537779, -0.21648093400514298, -0.29365404073655876, 0.14722311196992816, 0.57180165488865131, 0.57182680776660721, 0.31467894133703173, 0.10358846582242359, 0.019288531724146376, 0.0015763102184407605 }; static const std::size_t wv_db18_dec_lo_len = 36; static const double wv_db18_dec_hi[] = { -0.0015763102184407605, 0.019288531724146376, -0.10358846582242359, 0.31467894133703173, -0.57182680776660721, 0.57180165488865131, -0.14722311196992816, -0.29365404073655876, 0.21648093400514298, 0.14953397556537779, -0.16708131276325741, -0.092331884150846283, 0.10675224665982849, 0.064887216211905449, -0.057051247738536884, -0.044526141902982326, 0.023733210395860002, 0.026670705926470591, -0.0062621679543057073, -0.013051480946612001, -0.00011863003385811746, 0.0049433436054667377, 0.0011187326669924971, -0.0013405962983361066, -0.00062846568296514574, 0.0002135815619103407, 0.00019864855231174796, -1.5359171235347246e-07, -3.7412378807400385e-05, -8.5206025374466959e-06, 3.332634478885822e-06, 1.7687129836276155e-06, 7.6916326898851766e-08, -1.1760987670282317e-07, -3.0688358630451749e-08, -2.5079344549485983e-09 }; static const std::size_t wv_db18_dec_hi_len = 36; static const double wv_db18_rec_lo[] = { 0.0015763102184407605, 0.019288531724146376, 0.10358846582242359, 0.31467894133703173, 0.57182680776660721, 0.57180165488865131, 0.14722311196992816, -0.29365404073655876, -0.21648093400514298, 0.14953397556537779, 0.16708131276325741, -0.092331884150846283, -0.10675224665982849, 0.064887216211905449, 0.057051247738536884, -0.044526141902982326, -0.023733210395860002, 0.026670705926470591, 0.0062621679543057073, -0.013051480946612001, 0.00011863003385811746, 0.0049433436054667377, -0.0011187326669924971, -0.0013405962983361066, 0.00062846568296514574, 0.0002135815619103407, -0.00019864855231174796, -1.5359171235347246e-07, 3.7412378807400385e-05, -8.5206025374466959e-06, -3.332634478885822e-06, 1.7687129836276155e-06, -7.6916326898851766e-08, -1.1760987670282317e-07, 3.0688358630451749e-08, -2.5079344549485983e-09 }; static const std::size_t wv_db18_rec_lo_len = 36; static const double wv_db18_rec_hi[] = { -2.5079344549485983e-09, -3.0688358630451749e-08, -1.1760987670282317e-07, 7.6916326898851766e-08, 1.7687129836276155e-06, 3.332634478885822e-06, -8.5206025374466959e-06, -3.7412378807400385e-05, -1.5359171235347246e-07, 0.00019864855231174796, 0.0002135815619103407, -0.00062846568296514574, -0.0013405962983361066, 0.0011187326669924971, 0.0049433436054667377, -0.00011863003385811746, -0.013051480946612001, -0.0062621679543057073, 0.026670705926470591, 0.023733210395860002, -0.044526141902982326, -0.057051247738536884, 0.064887216211905449, 0.10675224665982849, -0.092331884150846283, -0.16708131276325741, 0.14953397556537779, 0.21648093400514298, -0.29365404073655876, -0.14722311196992816, 0.57180165488865131, -0.57182680776660721, 0.31467894133703173, -0.10358846582242359, 0.019288531724146376, -0.0015763102184407605 }; static const std::size_t wv_db18_rec_hi_len = 36; static const double wv_db20_dec_lo[] = { -2.9988364896193194e-10, 4.0561270555518328e-09, -1.814843248299696e-08, 2.0143220235505126e-10, 2.6339242262700013e-07, -6.8470795970005574e-07, -1.0119940100188862e-06, 7.2412482876736205e-06, -4.3761438621839971e-06, -3.7105861833947128e-05, 6.7742808283777301e-05, 0.00010153288973670291, -0.00038510474869921763, -5.3497598439976948e-05, 0.0013925596193231364, -0.00083156217282255693, -0.0035814942596096226, 0.0044205423870457908, 0.006721627302259457, -0.01381052613715192, -0.0087893249239015606, 0.03229429953076958, 0.0058746818118118266, -0.061722899624680458, 0.0056322468573074356, 0.10229171917444256, -0.024716827338613585, -0.15545875070726795, 0.039850246457771202, 0.22829105081991632, -0.016727088309077008, -0.32678680043403496, -0.13921208801148388, 0.36150229873933104, 0.61049323893859386, 0.47269618531090168, 0.21994211355139703, 0.063423780459081522, 0.010549394624950399, 0.00077995361366684629 }; static const std::size_t wv_db20_dec_lo_len = 40; static const double wv_db20_dec_hi[] = { -0.00077995361366684629, 0.010549394624950399, -0.063423780459081522, 0.21994211355139703, -0.47269618531090168, 0.61049323893859386, -0.36150229873933104, -0.13921208801148388, 0.32678680043403496, -0.016727088309077008, -0.22829105081991632, 0.039850246457771202, 0.15545875070726795, -0.024716827338613585, -0.10229171917444256, 0.0056322468573074356, 0.061722899624680458, 0.0058746818118118266, -0.03229429953076958, -0.0087893249239015606, 0.01381052613715192, 0.006721627302259457, -0.0044205423870457908, -0.0035814942596096226, 0.00083156217282255693, 0.0013925596193231364, 5.3497598439976948e-05, -0.00038510474869921763, -0.00010153288973670291, 6.7742808283777301e-05, 3.7105861833947128e-05, -4.3761438621839971e-06, -7.2412482876736205e-06, -1.0119940100188862e-06, 6.8470795970005574e-07, 2.6339242262700013e-07, -2.0143220235505126e-10, -1.814843248299696e-08, -4.0561270555518328e-09, -2.9988364896193194e-10 }; static const std::size_t wv_db20_dec_hi_len = 40; static const double wv_db20_rec_lo[] = { 0.00077995361366684629, 0.010549394624950399, 0.063423780459081522, 0.21994211355139703, 0.47269618531090168, 0.61049323893859386, 0.36150229873933104, -0.13921208801148388, -0.32678680043403496, -0.016727088309077008, 0.22829105081991632, 0.039850246457771202, -0.15545875070726795, -0.024716827338613585, 0.10229171917444256, 0.0056322468573074356, -0.061722899624680458, 0.0058746818118118266, 0.03229429953076958, -0.0087893249239015606, -0.01381052613715192, 0.006721627302259457, 0.0044205423870457908, -0.0035814942596096226, -0.00083156217282255693, 0.0013925596193231364, -5.3497598439976948e-05, -0.00038510474869921763, 0.00010153288973670291, 6.7742808283777301e-05, -3.7105861833947128e-05, -4.3761438621839971e-06, 7.2412482876736205e-06, -1.0119940100188862e-06, -6.8470795970005574e-07, 2.6339242262700013e-07, 2.0143220235505126e-10, -1.814843248299696e-08, 4.0561270555518328e-09, -2.9988364896193194e-10 }; static const std::size_t wv_db20_rec_lo_len = 40; static const double wv_db20_rec_hi[] = { -2.9988364896193194e-10, -4.0561270555518328e-09, -1.814843248299696e-08, -2.0143220235505126e-10, 2.6339242262700013e-07, 6.8470795970005574e-07, -1.0119940100188862e-06, -7.2412482876736205e-06, -4.3761438621839971e-06, 3.7105861833947128e-05, 6.7742808283777301e-05, -0.00010153288973670291, -0.00038510474869921763, 5.3497598439976948e-05, 0.0013925596193231364, 0.00083156217282255693, -0.0035814942596096226, -0.0044205423870457908, 0.006721627302259457, 0.01381052613715192, -0.0087893249239015606, -0.03229429953076958, 0.0058746818118118266, 0.061722899624680458, 0.0056322468573074356, -0.10229171917444256, -0.024716827338613585, 0.15545875070726795, 0.039850246457771202, -0.22829105081991632, -0.016727088309077008, 0.32678680043403496, -0.13921208801148388, -0.36150229873933104, 0.61049323893859386, -0.47269618531090168, 0.21994211355139703, -0.063423780459081522, 0.010549394624950399, -0.00077995361366684629 }; static const std::size_t wv_db20_rec_hi_len = 40; static const double wv_sym2_dec_lo[] = { -0.12940952255092145, 0.22414386804185735, 0.83651630373746899, 0.48296291314469025 }; static const std::size_t wv_sym2_dec_lo_len = 4; static const double wv_sym2_dec_hi[] = { -0.48296291314469025, 0.83651630373746899, -0.22414386804185735, -0.12940952255092145 }; static const std::size_t wv_sym2_dec_hi_len = 4; static const double wv_sym2_rec_lo[] = { 0.48296291314469025, 0.83651630373746899, 0.22414386804185735, -0.12940952255092145 }; static const std::size_t wv_sym2_rec_lo_len = 4; static const double wv_sym2_rec_hi[] = { -0.12940952255092145, -0.22414386804185735, 0.83651630373746899, -0.48296291314469025 }; static const std::size_t wv_sym2_rec_hi_len = 4; static const double wv_sym4_dec_lo[] = { -0.075765714789273325, -0.02963552764599851, 0.49761866763201545, 0.80373875180591614, 0.29785779560527736, -0.099219543576847216, -0.012603967262037833, 0.032223100604042702 }; static const std::size_t wv_sym4_dec_lo_len = 8; static const double wv_sym4_dec_hi[] = { -0.032223100604042702, -0.012603967262037833, 0.099219543576847216, 0.29785779560527736, -0.80373875180591614, 0.49761866763201545, 0.02963552764599851, -0.075765714789273325 }; static const std::size_t wv_sym4_dec_hi_len = 8; static const double wv_sym4_rec_lo[] = { 0.032223100604042702, -0.012603967262037833, -0.099219543576847216, 0.29785779560527736, 0.80373875180591614, 0.49761866763201545, -0.02963552764599851, -0.075765714789273325 }; static const std::size_t wv_sym4_rec_lo_len = 8; static const double wv_sym4_rec_hi[] = { -0.075765714789273325, 0.02963552764599851, 0.49761866763201545, -0.80373875180591614, 0.29785779560527736, 0.099219543576847216, -0.012603967262037833, -0.032223100604042702 }; static const std::size_t wv_sym4_rec_hi_len = 8; static const double wv_sym6_dec_lo[] = { 0.015404109327027373, 0.0034907120842174702, -0.11799011114819057, -0.048311742585632998, 0.49105594192674662, 0.787641141030194, 0.3379294217276218, -0.072637522786462516, -0.021060292512300564, 0.044724901770665779, 0.0017677118642428036, -0.007800708325034148 }; static const std::size_t wv_sym6_dec_lo_len = 12; static const double wv_sym6_dec_hi[] = { 0.007800708325034148, 0.0017677118642428036, -0.044724901770665779, -0.021060292512300564, 0.072637522786462516, 0.3379294217276218, -0.787641141030194, 0.49105594192674662, 0.048311742585632998, -0.11799011114819057, -0.0034907120842174702, 0.015404109327027373 }; static const std::size_t wv_sym6_dec_hi_len = 12; static const double wv_sym6_rec_lo[] = { -0.007800708325034148, 0.0017677118642428036, 0.044724901770665779, -0.021060292512300564, -0.072637522786462516, 0.3379294217276218, 0.787641141030194, 0.49105594192674662, -0.048311742585632998, -0.11799011114819057, 0.0034907120842174702, 0.015404109327027373 }; static const std::size_t wv_sym6_rec_lo_len = 12; static const double wv_sym6_rec_hi[] = { 0.015404109327027373, -0.0034907120842174702, -0.11799011114819057, 0.048311742585632998, 0.49105594192674662, -0.787641141030194, 0.3379294217276218, 0.072637522786462516, -0.021060292512300564, -0.044724901770665779, 0.0017677118642428036, 0.007800708325034148 }; static const std::size_t wv_sym6_rec_hi_len = 12; static const double wv_sym8_dec_lo[] = { -0.0033824159510061256, -0.00054213233179114812, 0.031695087811492981, 0.0076074873249176054, -0.14329423835080971, -0.061273359067658524, 0.48135965125837221, 0.77718575170052351, 0.3644418948353314, -0.051945838107709037, -0.027219029917056003, 0.049137179673607506, 0.0038087520138906151, -0.014952258337048231, -0.0003029205147213668, 0.0018899503327594609 }; static const std::size_t wv_sym8_dec_lo_len = 16; static const double wv_sym8_dec_hi[] = { -0.0018899503327594609, -0.0003029205147213668, 0.014952258337048231, 0.0038087520138906151, -0.049137179673607506, -0.027219029917056003, 0.051945838107709037, 0.3644418948353314, -0.77718575170052351, 0.48135965125837221, 0.061273359067658524, -0.14329423835080971, -0.0076074873249176054, 0.031695087811492981, 0.00054213233179114812, -0.0033824159510061256 }; static const std::size_t wv_sym8_dec_hi_len = 16; static const double wv_sym8_rec_lo[] = { 0.0018899503327594609, -0.0003029205147213668, -0.014952258337048231, 0.0038087520138906151, 0.049137179673607506, -0.027219029917056003, -0.051945838107709037, 0.3644418948353314, 0.77718575170052351, 0.48135965125837221, -0.061273359067658524, -0.14329423835080971, 0.0076074873249176054, 0.031695087811492981, -0.00054213233179114812, -0.0033824159510061256 }; static const std::size_t wv_sym8_rec_lo_len = 16; static const double wv_sym8_rec_hi[] = { -0.0033824159510061256, 0.00054213233179114812, 0.031695087811492981, -0.0076074873249176054, -0.14329423835080971, 0.061273359067658524, 0.48135965125837221, -0.77718575170052351, 0.3644418948353314, 0.051945838107709037, -0.027219029917056003, -0.049137179673607506, 0.0038087520138906151, 0.014952258337048231, -0.0003029205147213668, -0.0018899503327594609 }; static const std::size_t wv_sym8_rec_hi_len = 16; static const double wv_sym10_dec_lo[] = { 0.00077015980911449011, 9.5632670722894754e-05, -0.0086412992770224222, -0.0014653825813050513, 0.045927239231092203, 0.011609893903711381, -0.15949427888491757, -0.070880535783243853, 0.47169066693843925, 0.7695100370211071, 0.38382676106708546, -0.035536740473817552, -0.0319900568824278, 0.049994972077376687, 0.0057649120335819086, -0.02035493981231129, -0.00080435893201654491, 0.0045931735853118284, 5.7036083618494284e-05, -0.00045932942100465878 }; static const std::size_t wv_sym10_dec_lo_len = 20; static const double wv_sym10_dec_hi[] = { 0.00045932942100465878, 5.7036083618494284e-05, -0.0045931735853118284, -0.00080435893201654491, 0.02035493981231129, 0.0057649120335819086, -0.049994972077376687, -0.0319900568824278, 0.035536740473817552, 0.38382676106708546, -0.7695100370211071, 0.47169066693843925, 0.070880535783243853, -0.15949427888491757, -0.011609893903711381, 0.045927239231092203, 0.0014653825813050513, -0.0086412992770224222, -9.5632670722894754e-05, 0.00077015980911449011 }; static const std::size_t wv_sym10_dec_hi_len = 20; static const double wv_sym10_rec_lo[] = { -0.00045932942100465878, 5.7036083618494284e-05, 0.0045931735853118284, -0.00080435893201654491, -0.02035493981231129, 0.0057649120335819086, 0.049994972077376687, -0.0319900568824278, -0.035536740473817552, 0.38382676106708546, 0.7695100370211071, 0.47169066693843925, -0.070880535783243853, -0.15949427888491757, 0.011609893903711381, 0.045927239231092203, -0.0014653825813050513, -0.0086412992770224222, 9.5632670722894754e-05, 0.00077015980911449011 }; static const std::size_t wv_sym10_rec_lo_len = 20; static const double wv_sym10_rec_hi[] = { 0.00077015980911449011, -9.5632670722894754e-05, -0.0086412992770224222, 0.0014653825813050513, 0.045927239231092203, -0.011609893903711381, -0.15949427888491757, 0.070880535783243853, 0.47169066693843925, -0.7695100370211071, 0.38382676106708546, 0.035536740473817552, -0.0319900568824278, -0.049994972077376687, 0.0057649120335819086, 0.02035493981231129, -0.00080435893201654491, -0.0045931735853118284, 5.7036083618494284e-05, 0.00045932942100465878 }; static const std::size_t wv_sym10_rec_hi_len = 20; static const double wv_sym12_dec_lo[] = { 0.00011196719424656033, -1.1353928041541452e-05, -0.0013497557555715387, 0.00018021409008538188, 0.007414965517654251, -0.0014089092443297553, -0.024220722675013445, 0.0075537806116804775, 0.049179318299660837, -0.035848830736954392, -0.022162306170337816, 0.39888597239022, 0.76347909778365719, 0.46274103121927235, -0.07833262231634322, -0.17037069723886492, 0.01530174062247884, 0.057804179445505657, -0.0026043910313322326, -0.014589836449234145, 0.00030764779631059454, 0.0023502976141834648, -1.8158078862617515e-05, -0.00017906658697508691 }; static const std::size_t wv_sym12_dec_lo_len = 24; static const double wv_sym12_dec_hi[] = { 0.00017906658697508691, -1.8158078862617515e-05, -0.0023502976141834648, 0.00030764779631059454, 0.014589836449234145, -0.0026043910313322326, -0.057804179445505657, 0.01530174062247884, 0.17037069723886492, -0.07833262231634322, -0.46274103121927235, 0.76347909778365719, -0.39888597239022, -0.022162306170337816, 0.035848830736954392, 0.049179318299660837, -0.0075537806116804775, -0.024220722675013445, 0.0014089092443297553, 0.007414965517654251, -0.00018021409008538188, -0.0013497557555715387, 1.1353928041541452e-05, 0.00011196719424656033 }; static const std::size_t wv_sym12_dec_hi_len = 24; static const double wv_sym12_rec_lo[] = { -0.00017906658697508691, -1.8158078862617515e-05, 0.0023502976141834648, 0.00030764779631059454, -0.014589836449234145, -0.0026043910313322326, 0.057804179445505657, 0.01530174062247884, -0.17037069723886492, -0.07833262231634322, 0.46274103121927235, 0.76347909778365719, 0.39888597239022, -0.022162306170337816, -0.035848830736954392, 0.049179318299660837, 0.0075537806116804775, -0.024220722675013445, -0.0014089092443297553, 0.007414965517654251, 0.00018021409008538188, -0.0013497557555715387, -1.1353928041541452e-05, 0.00011196719424656033 }; static const std::size_t wv_sym12_rec_lo_len = 24; static const double wv_sym12_rec_hi[] = { 0.00011196719424656033, 1.1353928041541452e-05, -0.0013497557555715387, -0.00018021409008538188, 0.007414965517654251, 0.0014089092443297553, -0.024220722675013445, -0.0075537806116804775, 0.049179318299660837, 0.035848830736954392, -0.022162306170337816, -0.39888597239022, 0.76347909778365719, -0.46274103121927235, -0.07833262231634322, 0.17037069723886492, 0.01530174062247884, -0.057804179445505657, -0.0026043910313322326, 0.014589836449234145, 0.00030764779631059454, -0.0023502976141834648, -1.8158078862617515e-05, 0.00017906658697508691 }; static const std::size_t wv_sym12_rec_hi_len = 24; static const double wv_sym14_dec_lo[] = { -2.5879090265397886e-05, 1.1210865808890361e-05, 0.00039843567297594335, -6.2865424814776362e-05, -0.002579441725933078, 0.00036647657366011829, 0.010037693717672269, -0.0027537747912240711, -0.029196217764038187, 0.0042805204990193782, 0.037433088362853452, -0.057634498351326995, -0.035318112114979733, 0.39320152196208885, 0.75997624196109093, 0.47533576263420663, -0.058111823317717831, -0.15999741114652205, 0.025898587531046669, 0.069827616361807551, -0.0023650488367403851, -0.019439314263626713, 0.0010131419871842082, 0.0045326774719456481, -7.3214213567023991e-05, -0.00060576018246643346, 1.9329016965523917e-05, 4.4618977991475265e-05 }; static const std::size_t wv_sym14_dec_lo_len = 28; static const double wv_sym14_dec_hi[] = { -4.4618977991475265e-05, 1.9329016965523917e-05, 0.00060576018246643346, -7.3214213567023991e-05, -0.0045326774719456481, 0.0010131419871842082, 0.019439314263626713, -0.0023650488367403851, -0.069827616361807551, 0.025898587531046669, 0.15999741114652205, -0.058111823317717831, -0.47533576263420663, 0.75997624196109093, -0.39320152196208885, -0.035318112114979733, 0.057634498351326995, 0.037433088362853452, -0.0042805204990193782, -0.029196217764038187, 0.0027537747912240711, 0.010037693717672269, -0.00036647657366011829, -0.002579441725933078, 6.2865424814776362e-05, 0.00039843567297594335, -1.1210865808890361e-05, -2.5879090265397886e-05 }; static const std::size_t wv_sym14_dec_hi_len = 28; static const double wv_sym14_rec_lo[] = { 4.4618977991475265e-05, 1.9329016965523917e-05, -0.00060576018246643346, -7.3214213567023991e-05, 0.0045326774719456481, 0.0010131419871842082, -0.019439314263626713, -0.0023650488367403851, 0.069827616361807551, 0.025898587531046669, -0.15999741114652205, -0.058111823317717831, 0.47533576263420663, 0.75997624196109093, 0.39320152196208885, -0.035318112114979733, -0.057634498351326995, 0.037433088362853452, 0.0042805204990193782, -0.029196217764038187, -0.0027537747912240711, 0.010037693717672269, 0.00036647657366011829, -0.002579441725933078, -6.2865424814776362e-05, 0.00039843567297594335, 1.1210865808890361e-05, -2.5879090265397886e-05 }; static const std::size_t wv_sym14_rec_lo_len = 28; static const double wv_sym14_rec_hi[] = { -2.5879090265397886e-05, -1.1210865808890361e-05, 0.00039843567297594335, 6.2865424814776362e-05, -0.002579441725933078, -0.00036647657366011829, 0.010037693717672269, 0.0027537747912240711, -0.029196217764038187, -0.0042805204990193782, 0.037433088362853452, 0.057634498351326995, -0.035318112114979733, -0.39320152196208885, 0.75997624196109093, -0.47533576263420663, -0.058111823317717831, 0.15999741114652205, 0.025898587531046669, -0.069827616361807551, -0.0023650488367403851, 0.019439314263626713, 0.0010131419871842082, -0.0045326774719456481, -7.3214213567023991e-05, 0.00060576018246643346, 1.9329016965523917e-05, -4.4618977991475265e-05 }; static const std::size_t wv_sym14_rec_hi_len = 28; static const double wv_sym16_dec_lo[] = { 6.2300067012207606e-06, -3.1135564076219692e-06, -0.00010943147929529757, 2.8078582128442894e-05, 0.00085235471080470952, -0.0001084456223089688, -0.0038809122526038786, 0.00071821197883178923, 0.012666731659857348, -0.0031265171722710075, -0.031051202843553064, 0.0048692744049046071, 0.032333091610663785, -0.066983049070217779, -0.034574228416972504, 0.39712293362064416, 0.75652498787569711, 0.47534280601152273, -0.054040601387606135, -0.15959219218520598, 0.03072113906330156, 0.078037852903419913, -0.0035102750683740089, -0.024952758046290123, 0.001359844742484172, 0.0069377611308027096, -0.00022211647621176323, -0.0013387206066921965, 3.656592483348223e-05, 0.00016545679579108483, -5.3964831793152419e-06, -1.0797982104319795e-05 }; static const std::size_t wv_sym16_dec_lo_len = 32; static const double wv_sym16_dec_hi[] = { 1.0797982104319795e-05, -5.3964831793152419e-06, -0.00016545679579108483, 3.656592483348223e-05, 0.0013387206066921965, -0.00022211647621176323, -0.0069377611308027096, 0.001359844742484172, 0.024952758046290123, -0.0035102750683740089, -0.078037852903419913, 0.03072113906330156, 0.15959219218520598, -0.054040601387606135, -0.47534280601152273, 0.75652498787569711, -0.39712293362064416, -0.034574228416972504, 0.066983049070217779, 0.032333091610663785, -0.0048692744049046071, -0.031051202843553064, 0.0031265171722710075, 0.012666731659857348, -0.00071821197883178923, -0.0038809122526038786, 0.0001084456223089688, 0.00085235471080470952, -2.8078582128442894e-05, -0.00010943147929529757, 3.1135564076219692e-06, 6.2300067012207606e-06 }; static const std::size_t wv_sym16_dec_hi_len = 32; static const double wv_sym16_rec_lo[] = { -1.0797982104319795e-05, -5.3964831793152419e-06, 0.00016545679579108483, 3.656592483348223e-05, -0.0013387206066921965, -0.00022211647621176323, 0.0069377611308027096, 0.001359844742484172, -0.024952758046290123, -0.0035102750683740089, 0.078037852903419913, 0.03072113906330156, -0.15959219218520598, -0.054040601387606135, 0.47534280601152273, 0.75652498787569711, 0.39712293362064416, -0.034574228416972504, -0.066983049070217779, 0.032333091610663785, 0.0048692744049046071, -0.031051202843553064, -0.0031265171722710075, 0.012666731659857348, 0.00071821197883178923, -0.0038809122526038786, -0.0001084456223089688, 0.00085235471080470952, 2.8078582128442894e-05, -0.00010943147929529757, -3.1135564076219692e-06, 6.2300067012207606e-06 }; static const std::size_t wv_sym16_rec_lo_len = 32; static const double wv_sym16_rec_hi[] = { 6.2300067012207606e-06, 3.1135564076219692e-06, -0.00010943147929529757, -2.8078582128442894e-05, 0.00085235471080470952, 0.0001084456223089688, -0.0038809122526038786, -0.00071821197883178923, 0.012666731659857348, 0.0031265171722710075, -0.031051202843553064, -0.0048692744049046071, 0.032333091610663785, 0.066983049070217779, -0.034574228416972504, -0.39712293362064416, 0.75652498787569711, -0.47534280601152273, -0.054040601387606135, 0.15959219218520598, 0.03072113906330156, -0.078037852903419913, -0.0035102750683740089, 0.024952758046290123, 0.001359844742484172, -0.0069377611308027096, -0.00022211647621176323, 0.0013387206066921965, 3.656592483348223e-05, -0.00016545679579108483, -5.3964831793152419e-06, 1.0797982104319795e-05 }; static const std::size_t wv_sym16_rec_hi_len = 32; static const double wv_sym18_dec_lo[] = { 2.6126125564836423e-06, 1.354915761832114e-06, -4.5246757874949856e-05, -1.4020992577726755e-05, 0.00039616840638254753, 7.0212734590362685e-05, -0.0023138718145060992, -0.00041152110923597756, 0.0095021643909623654, 0.0016429863972782159, -0.030325091089369604, -0.0050770851607570529, 0.084219929970386548, 0.033995667103947358, -0.15993814866932407, -0.052029158983952786, 0.47396905989393956, 0.75362914010179283, 0.40148386057061813, -0.032480573290138676, -0.073799207290607169, 0.028529597039037808, 0.0062779445543116943, -0.031712684731814537, -0.0032607442000749834, 0.015012356344250213, 0.0010877847895956929, -0.0052397896830266083, -0.00018877623940755607, 0.0014280863270832796, 4.7416145183736671e-05, -0.00026583011024241041, -9.858816030140058e-06, 2.9557437620930811e-05, 7.8472980558317646e-07, -1.5131530692371587e-06 }; static const std::size_t wv_sym18_dec_lo_len = 36; static const double wv_sym18_dec_hi[] = { 1.5131530692371587e-06, 7.8472980558317646e-07, -2.9557437620930811e-05, -9.858816030140058e-06, 0.00026583011024241041, 4.7416145183736671e-05, -0.0014280863270832796, -0.00018877623940755607, 0.0052397896830266083, 0.0010877847895956929, -0.015012356344250213, -0.0032607442000749834, 0.031712684731814537, 0.0062779445543116943, -0.028529597039037808, -0.073799207290607169, 0.032480573290138676, 0.40148386057061813, -0.75362914010179283, 0.47396905989393956, 0.052029158983952786, -0.15993814866932407, -0.033995667103947358, 0.084219929970386548, 0.0050770851607570529, -0.030325091089369604, -0.0016429863972782159, 0.0095021643909623654, 0.00041152110923597756, -0.0023138718145060992, -7.0212734590362685e-05, 0.00039616840638254753, 1.4020992577726755e-05, -4.5246757874949856e-05, -1.354915761832114e-06, 2.6126125564836423e-06 }; static const std::size_t wv_sym18_dec_hi_len = 36; static const double wv_sym18_rec_lo[] = { -1.5131530692371587e-06, 7.8472980558317646e-07, 2.9557437620930811e-05, -9.858816030140058e-06, -0.00026583011024241041, 4.7416145183736671e-05, 0.0014280863270832796, -0.00018877623940755607, -0.0052397896830266083, 0.0010877847895956929, 0.015012356344250213, -0.0032607442000749834, -0.031712684731814537, 0.0062779445543116943, 0.028529597039037808, -0.073799207290607169, -0.032480573290138676, 0.40148386057061813, 0.75362914010179283, 0.47396905989393956, -0.052029158983952786, -0.15993814866932407, 0.033995667103947358, 0.084219929970386548, -0.0050770851607570529, -0.030325091089369604, 0.0016429863972782159, 0.0095021643909623654, -0.00041152110923597756, -0.0023138718145060992, 7.0212734590362685e-05, 0.00039616840638254753, -1.4020992577726755e-05, -4.5246757874949856e-05, 1.354915761832114e-06, 2.6126125564836423e-06 }; static const std::size_t wv_sym18_rec_lo_len = 36; static const double wv_sym18_rec_hi[] = { 2.6126125564836423e-06, -1.354915761832114e-06, -4.5246757874949856e-05, 1.4020992577726755e-05, 0.00039616840638254753, -7.0212734590362685e-05, -0.0023138718145060992, 0.00041152110923597756, 0.0095021643909623654, -0.0016429863972782159, -0.030325091089369604, 0.0050770851607570529, 0.084219929970386548, -0.033995667103947358, -0.15993814866932407, 0.052029158983952786, 0.47396905989393956, -0.75362914010179283, 0.40148386057061813, 0.032480573290138676, -0.073799207290607169, -0.028529597039037808, 0.0062779445543116943, 0.031712684731814537, -0.0032607442000749834, -0.015012356344250213, 0.0010877847895956929, 0.0052397896830266083, -0.00018877623940755607, -0.0014280863270832796, 4.7416145183736671e-05, 0.00026583011024241041, -9.858816030140058e-06, -2.9557437620930811e-05, 7.8472980558317646e-07, 1.5131530692371587e-06 }; static const std::size_t wv_sym18_rec_hi_len = 36; static const double wv_sym20_dec_lo[] = { 3.695537474835221e-07, -1.9015675890554106e-07, -7.919361411976999e-06, 3.0256660627369661e-06, 7.992967835772481e-05, -1.928412300645204e-05, -0.00049473109156726548, 7.2159911880740349e-05, 0.0020889947081901982, -0.0003052628317957281, -0.0066065857990888609, 0.0014230873594621453, 0.017004049023390339, -0.0033138573836233591, -0.031629437144957966, 0.0081232283560096815, 0.025579349509413946, -0.078994344928398158, -0.029819368880333728, 0.40583144434845059, 0.75116272842273002, 0.47199147510148703, -0.051088342921067398, -0.16057829841525254, 0.036250951653933078, 0.088919668028199561, -0.0068437019650692274, -0.035373336756604236, 0.0019385970672402002, 0.012157040948785737, -0.0006111263857992088, -0.0034716478028440734, 0.00012544091723067259, 0.00074761085978205719, -2.6615550335516086e-05, -0.00011739133516291466, 4.5254222091516362e-06, 1.22872527779612e-05, -3.2567026420174407e-07, -6.3291290447763946e-07 }; static const std::size_t wv_sym20_dec_lo_len = 40; static const double wv_sym20_dec_hi[] = { 6.3291290447763946e-07, -3.2567026420174407e-07, -1.22872527779612e-05, 4.5254222091516362e-06, 0.00011739133516291466, -2.6615550335516086e-05, -0.00074761085978205719, 0.00012544091723067259, 0.0034716478028440734, -0.0006111263857992088, -0.012157040948785737, 0.0019385970672402002, 0.035373336756604236, -0.0068437019650692274, -0.088919668028199561, 0.036250951653933078, 0.16057829841525254, -0.051088342921067398, -0.47199147510148703, 0.75116272842273002, -0.40583144434845059, -0.029819368880333728, 0.078994344928398158, 0.025579349509413946, -0.0081232283560096815, -0.031629437144957966, 0.0033138573836233591, 0.017004049023390339, -0.0014230873594621453, -0.0066065857990888609, 0.0003052628317957281, 0.0020889947081901982, -7.2159911880740349e-05, -0.00049473109156726548, 1.928412300645204e-05, 7.992967835772481e-05, -3.0256660627369661e-06, -7.919361411976999e-06, 1.9015675890554106e-07, 3.695537474835221e-07 }; static const std::size_t wv_sym20_dec_hi_len = 40; static const double wv_sym20_rec_lo[] = { -6.3291290447763946e-07, -3.2567026420174407e-07, 1.22872527779612e-05, 4.5254222091516362e-06, -0.00011739133516291466, -2.6615550335516086e-05, 0.00074761085978205719, 0.00012544091723067259, -0.0034716478028440734, -0.0006111263857992088, 0.012157040948785737, 0.0019385970672402002, -0.035373336756604236, -0.0068437019650692274, 0.088919668028199561, 0.036250951653933078, -0.16057829841525254, -0.051088342921067398, 0.47199147510148703, 0.75116272842273002, 0.40583144434845059, -0.029819368880333728, -0.078994344928398158, 0.025579349509413946, 0.0081232283560096815, -0.031629437144957966, -0.0033138573836233591, 0.017004049023390339, 0.0014230873594621453, -0.0066065857990888609, -0.0003052628317957281, 0.0020889947081901982, 7.2159911880740349e-05, -0.00049473109156726548, -1.928412300645204e-05, 7.992967835772481e-05, 3.0256660627369661e-06, -7.919361411976999e-06, -1.9015675890554106e-07, 3.695537474835221e-07 }; static const std::size_t wv_sym20_rec_lo_len = 40; static const double wv_sym20_rec_hi[] = { 3.695537474835221e-07, 1.9015675890554106e-07, -7.919361411976999e-06, -3.0256660627369661e-06, 7.992967835772481e-05, 1.928412300645204e-05, -0.00049473109156726548, -7.2159911880740349e-05, 0.0020889947081901982, 0.0003052628317957281, -0.0066065857990888609, -0.0014230873594621453, 0.017004049023390339, 0.0033138573836233591, -0.031629437144957966, -0.0081232283560096815, 0.025579349509413946, 0.078994344928398158, -0.029819368880333728, -0.40583144434845059, 0.75116272842273002, -0.47199147510148703, -0.051088342921067398, 0.16057829841525254, 0.036250951653933078, -0.088919668028199561, -0.0068437019650692274, 0.035373336756604236, 0.0019385970672402002, -0.012157040948785737, -0.0006111263857992088, 0.0034716478028440734, 0.00012544091723067259, -0.00074761085978205719, -2.6615550335516086e-05, 0.00011739133516291466, 4.5254222091516362e-06, -1.22872527779612e-05, -3.2567026420174407e-07, 6.3291290447763946e-07 }; static const std::size_t wv_sym20_rec_hi_len = 40; static const double wv_coif1_dec_lo[] = { -0.015655728135791993, -0.07273261951252645, 0.38486484686485778, 0.85257202021160039, 0.33789766245748182, -0.07273261951252645 }; static const std::size_t wv_coif1_dec_lo_len = 6; static const double wv_coif1_dec_hi[] = { 0.07273261951252645, 0.33789766245748182, -0.85257202021160039, 0.38486484686485778, 0.07273261951252645, -0.015655728135791993 }; static const std::size_t wv_coif1_dec_hi_len = 6; static const double wv_coif1_rec_lo[] = { -0.07273261951252645, 0.33789766245748182, 0.85257202021160039, 0.38486484686485778, -0.07273261951252645, -0.015655728135791993 }; static const std::size_t wv_coif1_rec_lo_len = 6; static const double wv_coif1_rec_hi[] = { -0.015655728135791993, 0.07273261951252645, 0.38486484686485778, -0.85257202021160039, 0.33789766245748182, 0.07273261951252645 }; static const std::size_t wv_coif1_rec_hi_len = 6; static const double wv_coif2_dec_lo[] = { -0.00072054944552034698, -0.0018232088709110323, 0.0056114348193688343, 0.02368017194684777, -0.059434418646431092, -0.076488599078280761, 0.41700518442323908, 0.81272363544941351, 0.38611006682276289, -0.067372554723725595, -0.041464936786871777, 0.016387336463203641 }; static const std::size_t wv_coif2_dec_lo_len = 12; static const double wv_coif2_dec_hi[] = { -0.016387336463203641, -0.041464936786871777, 0.067372554723725595, 0.38611006682276289, -0.81272363544941351, 0.41700518442323908, 0.076488599078280761, -0.059434418646431092, -0.02368017194684777, 0.0056114348193688343, 0.0018232088709110323, -0.00072054944552034698 }; static const std::size_t wv_coif2_dec_hi_len = 12; static const double wv_coif2_rec_lo[] = { 0.016387336463203641, -0.041464936786871777, -0.067372554723725595, 0.38611006682276289, 0.81272363544941351, 0.41700518442323908, -0.076488599078280761, -0.059434418646431092, 0.02368017194684777, 0.0056114348193688343, -0.0018232088709110323, -0.00072054944552034698 }; static const std::size_t wv_coif2_rec_lo_len = 12; static const double wv_coif2_rec_hi[] = { -0.00072054944552034698, 0.0018232088709110323, 0.0056114348193688343, -0.02368017194684777, -0.059434418646431092, 0.076488599078280761, 0.41700518442323908, -0.81272363544941351, 0.38611006682276289, 0.067372554723725595, -0.041464936786871777, -0.016387336463203641 }; static const std::size_t wv_coif2_rec_hi_len = 12; static const double wv_coif3_dec_lo[] = { -3.4599773197272781e-05, -7.0983302506379004e-05, 0.00046621695982040288, 0.0011175187708306303, -0.0025745176881367972, -0.0090079761367306242, 0.015880544863669452, 0.034555027573297738, -0.082301927106299827, -0.071799821619154838, 0.42848347637737, 0.79377722262608719, 0.40517690240911824, -0.061123390002972552, -0.065771911281469364, 0.023452696142077168, 0.0077825964256727463, -0.0037935128643808019 }; static const std::size_t wv_coif3_dec_lo_len = 18; static const double wv_coif3_dec_hi[] = { 0.0037935128643808019, 0.0077825964256727463, -0.023452696142077168, -0.065771911281469364, 0.061123390002972552, 0.40517690240911824, -0.79377722262608719, 0.42848347637737, 0.071799821619154838, -0.082301927106299827, -0.034555027573297738, 0.015880544863669452, 0.0090079761367306242, -0.0025745176881367972, -0.0011175187708306303, 0.00046621695982040288, 7.0983302506379004e-05, -3.4599773197272781e-05 }; static const std::size_t wv_coif3_dec_hi_len = 18; static const double wv_coif3_rec_lo[] = { -0.0037935128643808019, 0.0077825964256727463, 0.023452696142077168, -0.065771911281469364, -0.061123390002972552, 0.40517690240911824, 0.79377722262608719, 0.42848347637737, -0.071799821619154838, -0.082301927106299827, 0.034555027573297738, 0.015880544863669452, -0.0090079761367306242, -0.0025745176881367972, 0.0011175187708306303, 0.00046621695982040288, -7.0983302506379004e-05, -3.4599773197272781e-05 }; static const std::size_t wv_coif3_rec_lo_len = 18; static const double wv_coif3_rec_hi[] = { -3.4599773197272781e-05, 7.0983302506379004e-05, 0.00046621695982040288, -0.0011175187708306303, -0.0025745176881367972, 0.0090079761367306242, 0.015880544863669452, -0.034555027573297738, -0.082301927106299827, 0.071799821619154838, 0.42848347637737, -0.79377722262608719, 0.40517690240911824, 0.061123390002972552, -0.065771911281469364, -0.023452696142077168, 0.0077825964256727463, 0.0037935128643808019 }; static const std::size_t wv_coif3_rec_hi_len = 18; static const double wv_coif4_dec_lo[] = { -1.7849909144933469e-06, -3.259647940030751e-06, 3.1229861599195265e-05, 6.2338854312787192e-05, -0.00025997433712225682, -0.00058902022463321654, 0.0012665610789256603, 0.0037514346971460866, -0.0056582838001308835, -0.015211728187697211, 0.025082253337949612, 0.039334422605589149, -0.096220424535952642, -0.066627472366817167, 0.43438603311435653, 0.78223893442428261, 0.41530842700068227, -0.056077319603569258, -0.081266710249193727, 0.02668230466960483, 0.016068947131575029, -0.0073461679362680507, -0.001629492425226786, 0.00089231390253700297 }; static const std::size_t wv_coif4_dec_lo_len = 24; static const double wv_coif4_dec_hi[] = { -0.00089231390253700297, -0.001629492425226786, 0.0073461679362680507, 0.016068947131575029, -0.02668230466960483, -0.081266710249193727, 0.056077319603569258, 0.41530842700068227, -0.78223893442428261, 0.43438603311435653, 0.066627472366817167, -0.096220424535952642, -0.039334422605589149, 0.025082253337949612, 0.015211728187697211, -0.0056582838001308835, -0.0037514346971460866, 0.0012665610789256603, 0.00058902022463321654, -0.00025997433712225682, -6.2338854312787192e-05, 3.1229861599195265e-05, 3.259647940030751e-06, -1.7849909144933469e-06 }; static const std::size_t wv_coif4_dec_hi_len = 24; static const double wv_coif4_rec_lo[] = { 0.00089231390253700297, -0.001629492425226786, -0.0073461679362680507, 0.016068947131575029, 0.02668230466960483, -0.081266710249193727, -0.056077319603569258, 0.41530842700068227, 0.78223893442428261, 0.43438603311435653, -0.066627472366817167, -0.096220424535952642, 0.039334422605589149, 0.025082253337949612, -0.015211728187697211, -0.0056582838001308835, 0.0037514346971460866, 0.0012665610789256603, -0.00058902022463321654, -0.00025997433712225682, 6.2338854312787192e-05, 3.1229861599195265e-05, -3.259647940030751e-06, -1.7849909144933469e-06 }; static const std::size_t wv_coif4_rec_lo_len = 24; static const double wv_coif4_rec_hi[] = { -1.7849909144933469e-06, 3.259647940030751e-06, 3.1229861599195265e-05, -6.2338854312787192e-05, -0.00025997433712225682, 0.00058902022463321654, 0.0012665610789256603, -0.0037514346971460866, -0.0056582838001308835, 0.015211728187697211, 0.025082253337949612, -0.039334422605589149, -0.096220424535952642, 0.066627472366817167, 0.43438603311435653, -0.78223893442428261, 0.41530842700068227, 0.056077319603569258, -0.081266710249193727, -0.02668230466960483, 0.016068947131575029, 0.0073461679362680507, -0.001629492425226786, -0.00089231390253700297 }; static const std::size_t wv_coif4_rec_hi_len = 24; static const double wv_coif5_dec_lo[] = { -9.6040101127678941e-08, -1.6237995172048338e-07, 2.0612203985788783e-06, 3.7007277113394796e-06, -2.1270221672515614e-05, -4.1219861924265501e-05, 0.00014035632812373243, 0.00030185794166824478, -0.00063755892612588115, -0.0016616273039298788, 0.0024315754425382886, 0.0067615202206204169, -0.0091595073386761625, -0.019758391600965465, 0.032674799467057355, 0.041287530472117834, -0.10556315130733723, -0.06203775157498196, 0.43798230665916338, 0.77429362286032744, 0.42157126673075435, -0.052046670253554764, -0.091921588060086087, 0.028169744270532353, 0.023408322118927783, -0.010131584846900276, -0.0041593126275786402, 0.0021782943778456947, 0.00035857774116175768, -0.000212081862067494 }; static const std::size_t wv_coif5_dec_lo_len = 30; static const double wv_coif5_dec_hi[] = { 0.000212081862067494, 0.00035857774116175768, -0.0021782943778456947, -0.0041593126275786402, 0.010131584846900276, 0.023408322118927783, -0.028169744270532353, -0.091921588060086087, 0.052046670253554764, 0.42157126673075435, -0.77429362286032744, 0.43798230665916338, 0.06203775157498196, -0.10556315130733723, -0.041287530472117834, 0.032674799467057355, 0.019758391600965465, -0.0091595073386761625, -0.0067615202206204169, 0.0024315754425382886, 0.0016616273039298788, -0.00063755892612588115, -0.00030185794166824478, 0.00014035632812373243, 4.1219861924265501e-05, -2.1270221672515614e-05, -3.7007277113394796e-06, 2.0612203985788783e-06, 1.6237995172048338e-07, -9.6040101127678941e-08 }; static const std::size_t wv_coif5_dec_hi_len = 30; static const double wv_coif5_rec_lo[] = { -0.000212081862067494, 0.00035857774116175768, 0.0021782943778456947, -0.0041593126275786402, -0.010131584846900276, 0.023408322118927783, 0.028169744270532353, -0.091921588060086087, -0.052046670253554764, 0.42157126673075435, 0.77429362286032744, 0.43798230665916338, -0.06203775157498196, -0.10556315130733723, 0.041287530472117834, 0.032674799467057355, -0.019758391600965465, -0.0091595073386761625, 0.0067615202206204169, 0.0024315754425382886, -0.0016616273039298788, -0.00063755892612588115, 0.00030185794166824478, 0.00014035632812373243, -4.1219861924265501e-05, -2.1270221672515614e-05, 3.7007277113394796e-06, 2.0612203985788783e-06, -1.6237995172048338e-07, -9.6040101127678941e-08 }; static const std::size_t wv_coif5_rec_lo_len = 30; static const double wv_coif5_rec_hi[] = { -9.6040101127678941e-08, 1.6237995172048338e-07, 2.0612203985788783e-06, -3.7007277113394796e-06, -2.1270221672515614e-05, 4.1219861924265501e-05, 0.00014035632812373243, -0.00030185794166824478, -0.00063755892612588115, 0.0016616273039298788, 0.0024315754425382886, -0.0067615202206204169, -0.0091595073386761625, 0.019758391600965465, 0.032674799467057355, -0.041287530472117834, -0.10556315130733723, 0.06203775157498196, 0.43798230665916338, -0.77429362286032744, 0.42157126673075435, 0.052046670253554764, -0.091921588060086087, -0.028169744270532353, 0.023408322118927783, 0.010131584846900276, -0.0041593126275786402, -0.0021782943778456947, 0.00035857774116175768, 0.000212081862067494 }; static const std::size_t wv_coif5_rec_hi_len = 30; static const double wv_bior1_1_dec_lo[] = { 0.70710678118654757, 0.70710678118654757 }; static const std::size_t wv_bior1_1_dec_lo_len = 2; static const double wv_bior1_1_dec_hi[] = { -0.70710678118654757, 0.70710678118654757 }; static const std::size_t wv_bior1_1_dec_hi_len = 2; static const double wv_bior1_1_rec_lo[] = { 0.70710678118654757, 0.70710678118654757 }; static const std::size_t wv_bior1_1_rec_lo_len = 2; static const double wv_bior1_1_rec_hi[] = { 0.70710678118654757, -0.70710678118654757 }; static const std::size_t wv_bior1_1_rec_hi_len = 2; static const double wv_bior1_3_dec_lo[] = { -0.088388347648318447, 0.088388347648318447, 0.70710678118654757, 0.70710678118654757, 0.088388347648318447, -0.088388347648318447 }; static const std::size_t wv_bior1_3_dec_lo_len = 6; static const double wv_bior1_3_dec_hi[] = { -0, 0, -0.70710678118654757, 0.70710678118654757, -0, 0 }; static const std::size_t wv_bior1_3_dec_hi_len = 6; static const double wv_bior1_3_rec_lo[] = { 0, 0, 0.70710678118654757, 0.70710678118654757, 0, 0 }; static const std::size_t wv_bior1_3_rec_lo_len = 6; static const double wv_bior1_3_rec_hi[] = { -0.088388347648318447, -0.088388347648318447, 0.70710678118654757, -0.70710678118654757, 0.088388347648318447, 0.088388347648318447 }; static const std::size_t wv_bior1_3_rec_hi_len = 6; static const double wv_bior1_5_dec_lo[] = { 0.016572815184059706, -0.016572815184059706, -0.12153397801643785, 0.12153397801643785, 0.70710678118654757, 0.70710678118654757, 0.12153397801643785, -0.12153397801643785, -0.016572815184059706, 0.016572815184059706 }; static const std::size_t wv_bior1_5_dec_lo_len = 10; static const double wv_bior1_5_dec_hi[] = { -0, 0, -0, 0, -0.70710678118654757, 0.70710678118654757, -0, 0, -0, 0 }; static const std::size_t wv_bior1_5_dec_hi_len = 10; static const double wv_bior1_5_rec_lo[] = { 0, 0, 0, 0, 0.70710678118654757, 0.70710678118654757, 0, 0, 0, 0 }; static const std::size_t wv_bior1_5_rec_lo_len = 10; static const double wv_bior1_5_rec_hi[] = { 0.016572815184059706, 0.016572815184059706, -0.12153397801643785, -0.12153397801643785, 0.70710678118654757, -0.70710678118654757, 0.12153397801643785, 0.12153397801643785, -0.016572815184059706, -0.016572815184059706 }; static const std::size_t wv_bior1_5_rec_hi_len = 10; static const double wv_bior2_2_dec_lo[] = { 0, -0.17677669529663689, 0.35355339059327379, 1.0606601717798212, 0.35355339059327379, -0.17677669529663689 }; static const std::size_t wv_bior2_2_dec_lo_len = 6; static const double wv_bior2_2_dec_hi[] = { -0, 0.35355339059327379, -0.70710678118654757, 0.35355339059327379, -0, 0 }; static const std::size_t wv_bior2_2_dec_hi_len = 6; static const double wv_bior2_2_rec_lo[] = { 0, 0.35355339059327379, 0.70710678118654757, 0.35355339059327379, 0, 0 }; static const std::size_t wv_bior2_2_rec_lo_len = 6; static const double wv_bior2_2_rec_hi[] = { 0, 0.17677669529663689, 0.35355339059327379, -1.0606601717798212, 0.35355339059327379, 0.17677669529663689 }; static const std::size_t wv_bior2_2_rec_hi_len = 6; static const double wv_bior2_4_dec_lo[] = { 0, 0.033145630368119412, -0.066291260736238825, -0.17677669529663689, 0.4198446513295126, 0.99436891104358249, 0.4198446513295126, -0.17677669529663689, -0.066291260736238825, 0.033145630368119412 }; static const std::size_t wv_bior2_4_dec_lo_len = 10; static const double wv_bior2_4_dec_hi[] = { -0, 0, -0, 0.35355339059327379, -0.70710678118654757, 0.35355339059327379, -0, 0, -0, 0 }; static const std::size_t wv_bior2_4_dec_hi_len = 10; static const double wv_bior2_4_rec_lo[] = { 0, 0, 0, 0.35355339059327379, 0.70710678118654757, 0.35355339059327379, 0, 0, 0, 0 }; static const std::size_t wv_bior2_4_rec_lo_len = 10; static const double wv_bior2_4_rec_hi[] = { 0, -0.033145630368119412, -0.066291260736238825, 0.17677669529663689, 0.4198446513295126, -0.99436891104358249, 0.4198446513295126, 0.17677669529663689, -0.066291260736238825, -0.033145630368119412 }; static const std::size_t wv_bior2_4_rec_hi_len = 10; static const double wv_bior2_6_dec_lo[] = { 0, -0.0069053396600248784, 0.013810679320049757, 0.046956309688169169, -0.1077232986963881, -0.16987135563661201, 0.44746600996961211, 0.96674755240348298, 0.44746600996961211, -0.16987135563661201, -0.1077232986963881, 0.046956309688169169, 0.013810679320049757, -0.0069053396600248784 }; static const std::size_t wv_bior2_6_dec_lo_len = 14; static const double wv_bior2_6_dec_hi[] = { -0, 0, -0, 0, -0, 0.35355339059327379, -0.70710678118654757, 0.35355339059327379, -0, 0, -0, 0, -0, 0 }; static const std::size_t wv_bior2_6_dec_hi_len = 14; static const double wv_bior2_6_rec_lo[] = { 0, 0, 0, 0, 0, 0.35355339059327379, 0.70710678118654757, 0.35355339059327379, 0, 0, 0, 0, 0, 0 }; static const std::size_t wv_bior2_6_rec_lo_len = 14; static const double wv_bior2_6_rec_hi[] = { 0, 0.0069053396600248784, 0.013810679320049757, -0.046956309688169169, -0.1077232986963881, 0.16987135563661201, 0.44746600996961211, -0.96674755240348298, 0.44746600996961211, 0.16987135563661201, -0.1077232986963881, -0.046956309688169169, 0.013810679320049757, 0.0069053396600248784 }; static const std::size_t wv_bior2_6_rec_hi_len = 14; static const double wv_bior2_8_dec_lo[] = { 0, 0.0015105430506304422, -0.0030210861012608843, -0.012947511862546647, 0.028916109826354178, 0.052998481890690938, -0.13491307360773605, -0.16382918343409023, 0.46257144047591653, 0.95164212189717856, 0.46257144047591653, -0.16382918343409023, -0.13491307360773605, 0.052998481890690938, 0.028916109826354178, -0.012947511862546647, -0.0030210861012608843, 0.0015105430506304422 }; static const std::size_t wv_bior2_8_dec_lo_len = 18; static const double wv_bior2_8_dec_hi[] = { -0, 0, -0, 0, -0, 0, -0, 0.35355339059327379, -0.70710678118654757, 0.35355339059327379, -0, 0, -0, 0, -0, 0, -0, 0 }; static const std::size_t wv_bior2_8_dec_hi_len = 18; static const double wv_bior2_8_rec_lo[] = { 0, 0, 0, 0, 0, 0, 0, 0.35355339059327379, 0.70710678118654757, 0.35355339059327379, 0, 0, 0, 0, 0, 0, 0, 0 }; static const std::size_t wv_bior2_8_rec_lo_len = 18; static const double wv_bior2_8_rec_hi[] = { 0, -0.0015105430506304422, -0.0030210861012608843, 0.012947511862546647, 0.028916109826354178, -0.052998481890690938, -0.13491307360773605, 0.16382918343409023, 0.46257144047591653, -0.95164212189717856, 0.46257144047591653, 0.16382918343409023, -0.13491307360773605, -0.052998481890690938, 0.028916109826354178, 0.012947511862546647, -0.0030210861012608843, -0.0015105430506304422 }; static const std::size_t wv_bior2_8_rec_hi_len = 18; static const double wv_bior3_1_dec_lo[] = { -0.35355339059327379, 1.0606601717798212, 1.0606601717798212, -0.35355339059327379 }; static const std::size_t wv_bior3_1_dec_lo_len = 4; static const double wv_bior3_1_dec_hi[] = { -0.17677669529663689, 0.5303300858899106, -0.5303300858899106, 0.17677669529663689 }; static const std::size_t wv_bior3_1_dec_hi_len = 4; static const double wv_bior3_1_rec_lo[] = { 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689 }; static const std::size_t wv_bior3_1_rec_lo_len = 4; static const double wv_bior3_1_rec_hi[] = { -0.35355339059327379, -1.0606601717798212, 1.0606601717798212, 0.35355339059327379 }; static const std::size_t wv_bior3_1_rec_hi_len = 4; static const double wv_bior3_3_dec_lo[] = { 0.066291260736238825, -0.19887378220871649, -0.15467960838455727, 0.99436891104358249, 0.99436891104358249, -0.15467960838455727, -0.19887378220871649, 0.066291260736238825 }; static const std::size_t wv_bior3_3_dec_lo_len = 8; static const double wv_bior3_3_dec_hi[] = { -0, 0, -0.17677669529663689, 0.5303300858899106, -0.5303300858899106, 0.17677669529663689, -0, 0 }; static const std::size_t wv_bior3_3_dec_hi_len = 8; static const double wv_bior3_3_rec_lo[] = { 0, 0, 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689, 0, 0 }; static const std::size_t wv_bior3_3_rec_lo_len = 8; static const double wv_bior3_3_rec_hi[] = { 0.066291260736238825, 0.19887378220871649, -0.15467960838455727, -0.99436891104358249, 0.99436891104358249, 0.15467960838455727, -0.19887378220871649, -0.066291260736238825 }; static const std::size_t wv_bior3_3_rec_hi_len = 8; static const double wv_bior3_5_dec_lo[] = { -0.013810679320049757, 0.041432037960149271, 0.052480581416189075, -0.26792717880896527, -0.07181553246425873, 0.96674755240348298, 0.96674755240348298, -0.07181553246425873, -0.26792717880896527, 0.052480581416189075, 0.041432037960149271, -0.013810679320049757 }; static const std::size_t wv_bior3_5_dec_lo_len = 12; static const double wv_bior3_5_dec_hi[] = { -0, 0, -0, 0, -0.17677669529663689, 0.5303300858899106, -0.5303300858899106, 0.17677669529663689, -0, 0, -0, 0 }; static const std::size_t wv_bior3_5_dec_hi_len = 12; static const double wv_bior3_5_rec_lo[] = { 0, 0, 0, 0, 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689, 0, 0, 0, 0 }; static const std::size_t wv_bior3_5_rec_lo_len = 12; static const double wv_bior3_5_rec_hi[] = { -0.013810679320049757, -0.041432037960149271, 0.052480581416189075, 0.26792717880896527, -0.07181553246425873, -0.96674755240348298, 0.96674755240348298, 0.07181553246425873, -0.26792717880896527, -0.052480581416189075, 0.041432037960149271, 0.013810679320049757 }; static const std::size_t wv_bior3_5_rec_hi_len = 12; static const double wv_bior3_7_dec_lo[] = { 0.0030210861012608843, -0.0090632583037826529, -0.016831765421310641, 0.074663985074019001, 0.031332978707362888, -0.301159125922835, -0.026499240945345469, 0.95164212189717856, 0.95164212189717856, -0.026499240945345469, -0.301159125922835, 0.031332978707362888, 0.074663985074019001, -0.016831765421310641, -0.0090632583037826529, 0.0030210861012608843 }; static const std::size_t wv_bior3_7_dec_lo_len = 16; static const double wv_bior3_7_dec_hi[] = { -0, 0, -0, 0, -0, 0, -0.17677669529663689, 0.5303300858899106, -0.5303300858899106, 0.17677669529663689, -0, 0, -0, 0, -0, 0 }; static const std::size_t wv_bior3_7_dec_hi_len = 16; static const double wv_bior3_7_rec_lo[] = { 0, 0, 0, 0, 0, 0, 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689, 0, 0, 0, 0, 0, 0 }; static const std::size_t wv_bior3_7_rec_lo_len = 16; static const double wv_bior3_7_rec_hi[] = { 0.0030210861012608843, 0.0090632583037826529, -0.016831765421310641, -0.074663985074019001, 0.031332978707362888, 0.301159125922835, -0.026499240945345469, -0.95164212189717856, 0.95164212189717856, 0.026499240945345469, -0.301159125922835, -0.031332978707362888, 0.074663985074019001, 0.016831765421310641, -0.0090632583037826529, -0.0030210861012608843 }; static const std::size_t wv_bior3_7_rec_hi_len = 16; static const double wv_bior3_9_dec_lo[] = { -0.0006797443727836989, 0.0020392331183510968, 0.0050603192196119811, -0.020618912641105536, -0.014112787930175844, 0.09913478249423216, 0.012300136269419315, -0.32019196836077857, 0.0020500227115698858, 0.94212570067820678, 0.94212570067820678, 0.0020500227115698858, -0.32019196836077857, 0.012300136269419315, 0.09913478249423216, -0.014112787930175844, -0.020618912641105536, 0.0050603192196119811, 0.0020392331183510968, -0.0006797443727836989 }; static const std::size_t wv_bior3_9_dec_lo_len = 20; static const double wv_bior3_9_dec_hi[] = { -0, 0, -0, 0, -0, 0, -0, 0, -0.17677669529663689, 0.5303300858899106, -0.5303300858899106, 0.17677669529663689, -0, 0, -0, 0, -0, 0, -0, 0 }; static const std::size_t wv_bior3_9_dec_hi_len = 20; static const double wv_bior3_9_rec_lo[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689, 0, 0, 0, 0, 0, 0, 0, 0 }; static const std::size_t wv_bior3_9_rec_lo_len = 20; static const double wv_bior3_9_rec_hi[] = { -0.0006797443727836989, -0.0020392331183510968, 0.0050603192196119811, 0.020618912641105536, -0.014112787930175844, -0.09913478249423216, 0.012300136269419315, 0.32019196836077857, 0.0020500227115698858, -0.94212570067820678, 0.94212570067820678, -0.0020500227115698858, -0.32019196836077857, -0.012300136269419315, 0.09913478249423216, 0.014112787930175844, -0.020618912641105536, -0.0050603192196119811, 0.0020392331183510968, 0.0006797443727836989 }; static const std::size_t wv_bior3_9_rec_hi_len = 20; static const double wv_bior4_4_dec_lo[] = { 0, 0.03782845550726404, -0.023849465019556843, -0.11062440441843718, 0.37740285561283066, 0.85269867900889385, 0.37740285561283066, -0.11062440441843718, -0.023849465019556843, 0.03782845550726404 }; static const std::size_t wv_bior4_4_dec_lo_len = 10; static const double wv_bior4_4_dec_hi[] = { -0, -0.064538882628697058, 0.040689417609164058, 0.41809227322161724, -0.7884856164055829, 0.41809227322161724, 0.040689417609164058, -0.064538882628697058, -0, 0 }; static const std::size_t wv_bior4_4_dec_hi_len = 10; static const double wv_bior4_4_rec_lo[] = { 0, -0.064538882628697058, -0.040689417609164058, 0.41809227322161724, 0.7884856164055829, 0.41809227322161724, -0.040689417609164058, -0.064538882628697058, 0, 0 }; static const std::size_t wv_bior4_4_rec_lo_len = 10; static const double wv_bior4_4_rec_hi[] = { 0, -0.03782845550726404, -0.023849465019556843, 0.11062440441843718, 0.37740285561283066, -0.85269867900889385, 0.37740285561283066, 0.11062440441843718, -0.023849465019556843, -0.03782845550726404 }; static const std::size_t wv_bior4_4_rec_hi_len = 10; static const double wv_bior5_5_dec_lo[] = { 0, 0, 0.03968708834740544, 0.0079481086372403219, -0.054463788468236907, 0.34560528195603346, 0.73666018142821055, 0.34560528195603346, -0.054463788468236907, 0.0079481086372403219, 0.03968708834740544, 0 }; static const std::size_t wv_bior5_5_dec_lo_len = 12; static const double wv_bior5_5_dec_hi[] = { -0.013456709459118716, -0.0026949668801115071, 0.13670658466432914, -0.093504697400938863, -0.47680326579848425, 0.89950610974864842, -0.47680326579848425, -0.093504697400938863, 0.13670658466432914, -0.0026949668801115071, -0.013456709459118716, 0 }; static const std::size_t wv_bior5_5_dec_hi_len = 12; static const double wv_bior5_5_rec_lo[] = { 0.013456709459118716, -0.0026949668801115071, -0.13670658466432914, -0.093504697400938863, 0.47680326579848425, 0.89950610974864842, 0.47680326579848425, -0.093504697400938863, -0.13670658466432914, -0.0026949668801115071, 0.013456709459118716, 0 }; static const std::size_t wv_bior5_5_rec_lo_len = 12; static const double wv_bior5_5_rec_hi[] = { 0, -0, 0.03968708834740544, -0.0079481086372403219, -0.054463788468236907, -0.34560528195603346, 0.73666018142821055, -0.34560528195603346, -0.054463788468236907, -0.0079481086372403219, 0.03968708834740544, -0 }; static const std::size_t wv_bior5_5_rec_hi_len = 12; static const double wv_bior6_8_dec_lo[] = { 0, 0.0019088317364812906, -0.0019142861290887667, -0.016990639867602342, 0.01193456527972926, 0.04973290349094079, -0.077263173167204144, -0.09405920349573646, 0.42079628460982682, 0.82592299745840225, 0.42079628460982682, -0.09405920349573646, -0.077263173167204144, 0.04973290349094079, 0.01193456527972926, -0.016990639867602342, -0.0019142861290887667, 0.0019088317364812906 }; static const std::size_t wv_bior6_8_dec_lo_len = 18; static const double wv_bior6_8_dec_hi[] = { -0, 0, -0, 0.014426282505624435, -0.014467504896790148, -0.078722001062628819, 0.040367979030339923, 0.41784910915027457, -0.75890772945365415, 0.41784910915027457, 0.040367979030339923, -0.078722001062628819, -0.014467504896790148, 0.014426282505624435, -0, 0, -0, 0 }; static const std::size_t wv_bior6_8_dec_hi_len = 18; static const double wv_bior6_8_rec_lo[] = { 0, 0, 0, 0.014426282505624435, 0.014467504896790148, -0.078722001062628819, -0.040367979030339923, 0.41784910915027457, 0.75890772945365415, 0.41784910915027457, -0.040367979030339923, -0.078722001062628819, 0.014467504896790148, 0.014426282505624435, 0, 0, 0, 0 }; static const std::size_t wv_bior6_8_rec_lo_len = 18; static const double wv_bior6_8_rec_hi[] = { 0, -0.0019088317364812906, -0.0019142861290887667, 0.016990639867602342, 0.01193456527972926, -0.04973290349094079, -0.077263173167204144, 0.09405920349573646, 0.42079628460982682, -0.82592299745840225, 0.42079628460982682, 0.09405920349573646, -0.077263173167204144, -0.04973290349094079, 0.01193456527972926, 0.016990639867602342, -0.0019142861290887667, -0.0019088317364812906 }; static const std::size_t wv_bior6_8_rec_hi_len = 18; static const double wv_rbio1_1_dec_lo[] = { 0.70710678118654757, 0.70710678118654757 }; static const std::size_t wv_rbio1_1_dec_lo_len = 2; static const double wv_rbio1_1_dec_hi[] = { -0.70710678118654757, 0.70710678118654757 }; static const std::size_t wv_rbio1_1_dec_hi_len = 2; static const double wv_rbio1_1_rec_lo[] = { 0.70710678118654757, 0.70710678118654757 }; static const std::size_t wv_rbio1_1_rec_lo_len = 2; static const double wv_rbio1_1_rec_hi[] = { 0.70710678118654757, -0.70710678118654757 }; static const std::size_t wv_rbio1_1_rec_hi_len = 2; static const double wv_rbio1_3_dec_lo[] = { 0, 0, 0.70710678118654757, 0.70710678118654757, 0, 0 }; static const std::size_t wv_rbio1_3_dec_lo_len = 6; static const double wv_rbio1_3_dec_hi[] = { 0.088388347648318447, 0.088388347648318447, -0.70710678118654757, 0.70710678118654757, -0.088388347648318447, -0.088388347648318447 }; static const std::size_t wv_rbio1_3_dec_hi_len = 6; static const double wv_rbio1_3_rec_lo[] = { -0.088388347648318447, 0.088388347648318447, 0.70710678118654757, 0.70710678118654757, 0.088388347648318447, -0.088388347648318447 }; static const std::size_t wv_rbio1_3_rec_lo_len = 6; static const double wv_rbio1_3_rec_hi[] = { 0, -0, 0.70710678118654757, -0.70710678118654757, 0, -0 }; static const std::size_t wv_rbio1_3_rec_hi_len = 6; static const double wv_rbio1_5_dec_lo[] = { 0, 0, 0, 0, 0.70710678118654757, 0.70710678118654757, 0, 0, 0, 0 }; static const std::size_t wv_rbio1_5_dec_lo_len = 10; static const double wv_rbio1_5_dec_hi[] = { -0.016572815184059706, -0.016572815184059706, 0.12153397801643785, 0.12153397801643785, -0.70710678118654757, 0.70710678118654757, -0.12153397801643785, -0.12153397801643785, 0.016572815184059706, 0.016572815184059706 }; static const std::size_t wv_rbio1_5_dec_hi_len = 10; static const double wv_rbio1_5_rec_lo[] = { 0.016572815184059706, -0.016572815184059706, -0.12153397801643785, 0.12153397801643785, 0.70710678118654757, 0.70710678118654757, 0.12153397801643785, -0.12153397801643785, -0.016572815184059706, 0.016572815184059706 }; static const std::size_t wv_rbio1_5_rec_lo_len = 10; static const double wv_rbio1_5_rec_hi[] = { 0, -0, 0, -0, 0.70710678118654757, -0.70710678118654757, 0, -0, 0, -0 }; static const std::size_t wv_rbio1_5_rec_hi_len = 10; static const double wv_rbio2_2_dec_lo[] = { 0, 0, 0.35355339059327379, 0.70710678118654757, 0.35355339059327379, 0 }; static const std::size_t wv_rbio2_2_dec_lo_len = 6; static const double wv_rbio2_2_dec_hi[] = { 0.17677669529663689, 0.35355339059327379, -1.0606601717798212, 0.35355339059327379, 0.17677669529663689, 0 }; static const std::size_t wv_rbio2_2_dec_hi_len = 6; static const double wv_rbio2_2_rec_lo[] = { -0.17677669529663689, 0.35355339059327379, 1.0606601717798212, 0.35355339059327379, -0.17677669529663689, 0 }; static const std::size_t wv_rbio2_2_rec_lo_len = 6; static const double wv_rbio2_2_rec_hi[] = { 0, -0, 0.35355339059327379, -0.70710678118654757, 0.35355339059327379, -0 }; static const std::size_t wv_rbio2_2_rec_hi_len = 6; static const double wv_rbio2_4_dec_lo[] = { 0, 0, 0, 0, 0.35355339059327379, 0.70710678118654757, 0.35355339059327379, 0, 0, 0 }; static const std::size_t wv_rbio2_4_dec_lo_len = 10; static const double wv_rbio2_4_dec_hi[] = { -0.033145630368119412, -0.066291260736238825, 0.17677669529663689, 0.4198446513295126, -0.99436891104358249, 0.4198446513295126, 0.17677669529663689, -0.066291260736238825, -0.033145630368119412, 0 }; static const std::size_t wv_rbio2_4_dec_hi_len = 10; static const double wv_rbio2_4_rec_lo[] = { 0.033145630368119412, -0.066291260736238825, -0.17677669529663689, 0.4198446513295126, 0.99436891104358249, 0.4198446513295126, -0.17677669529663689, -0.066291260736238825, 0.033145630368119412, 0 }; static const std::size_t wv_rbio2_4_rec_lo_len = 10; static const double wv_rbio2_4_rec_hi[] = { 0, -0, 0, -0, 0.35355339059327379, -0.70710678118654757, 0.35355339059327379, -0, 0, -0 }; static const std::size_t wv_rbio2_4_rec_hi_len = 10; static const double wv_rbio2_6_dec_lo[] = { 0, 0, 0, 0, 0, 0, 0.35355339059327379, 0.70710678118654757, 0.35355339059327379, 0, 0, 0, 0, 0 }; static const std::size_t wv_rbio2_6_dec_lo_len = 14; static const double wv_rbio2_6_dec_hi[] = { 0.0069053396600248784, 0.013810679320049757, -0.046956309688169169, -0.1077232986963881, 0.16987135563661201, 0.44746600996961211, -0.96674755240348298, 0.44746600996961211, 0.16987135563661201, -0.1077232986963881, -0.046956309688169169, 0.013810679320049757, 0.0069053396600248784, 0 }; static const std::size_t wv_rbio2_6_dec_hi_len = 14; static const double wv_rbio2_6_rec_lo[] = { -0.0069053396600248784, 0.013810679320049757, 0.046956309688169169, -0.1077232986963881, -0.16987135563661201, 0.44746600996961211, 0.96674755240348298, 0.44746600996961211, -0.16987135563661201, -0.1077232986963881, 0.046956309688169169, 0.013810679320049757, -0.0069053396600248784, 0 }; static const std::size_t wv_rbio2_6_rec_lo_len = 14; static const double wv_rbio2_6_rec_hi[] = { 0, -0, 0, -0, 0, -0, 0.35355339059327379, -0.70710678118654757, 0.35355339059327379, -0, 0, -0, 0, -0 }; static const std::size_t wv_rbio2_6_rec_hi_len = 14; static const double wv_rbio2_8_dec_lo[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0.35355339059327379, 0.70710678118654757, 0.35355339059327379, 0, 0, 0, 0, 0, 0, 0 }; static const std::size_t wv_rbio2_8_dec_lo_len = 18; static const double wv_rbio2_8_dec_hi[] = { -0.0015105430506304422, -0.0030210861012608843, 0.012947511862546647, 0.028916109826354178, -0.052998481890690938, -0.13491307360773605, 0.16382918343409023, 0.46257144047591653, -0.95164212189717856, 0.46257144047591653, 0.16382918343409023, -0.13491307360773605, -0.052998481890690938, 0.028916109826354178, 0.012947511862546647, -0.0030210861012608843, -0.0015105430506304422, 0 }; static const std::size_t wv_rbio2_8_dec_hi_len = 18; static const double wv_rbio2_8_rec_lo[] = { 0.0015105430506304422, -0.0030210861012608843, -0.012947511862546647, 0.028916109826354178, 0.052998481890690938, -0.13491307360773605, -0.16382918343409023, 0.46257144047591653, 0.95164212189717856, 0.46257144047591653, -0.16382918343409023, -0.13491307360773605, 0.052998481890690938, 0.028916109826354178, -0.012947511862546647, -0.0030210861012608843, 0.0015105430506304422, 0 }; static const std::size_t wv_rbio2_8_rec_lo_len = 18; static const double wv_rbio2_8_rec_hi[] = { 0, -0, 0, -0, 0, -0, 0, -0, 0.35355339059327379, -0.70710678118654757, 0.35355339059327379, -0, 0, -0, 0, -0, 0, -0 }; static const std::size_t wv_rbio2_8_rec_hi_len = 18; static const double wv_rbio3_1_dec_lo[] = { 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689 }; static const std::size_t wv_rbio3_1_dec_lo_len = 4; static const double wv_rbio3_1_dec_hi[] = { 0.35355339059327379, 1.0606601717798212, -1.0606601717798212, -0.35355339059327379 }; static const std::size_t wv_rbio3_1_dec_hi_len = 4; static const double wv_rbio3_1_rec_lo[] = { -0.35355339059327379, 1.0606601717798212, 1.0606601717798212, -0.35355339059327379 }; static const std::size_t wv_rbio3_1_rec_lo_len = 4; static const double wv_rbio3_1_rec_hi[] = { 0.17677669529663689, -0.5303300858899106, 0.5303300858899106, -0.17677669529663689 }; static const std::size_t wv_rbio3_1_rec_hi_len = 4; static const double wv_rbio3_3_dec_lo[] = { 0, 0, 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689, 0, 0 }; static const std::size_t wv_rbio3_3_dec_lo_len = 8; static const double wv_rbio3_3_dec_hi[] = { -0.066291260736238825, -0.19887378220871649, 0.15467960838455727, 0.99436891104358249, -0.99436891104358249, -0.15467960838455727, 0.19887378220871649, 0.066291260736238825 }; static const std::size_t wv_rbio3_3_dec_hi_len = 8; static const double wv_rbio3_3_rec_lo[] = { 0.066291260736238825, -0.19887378220871649, -0.15467960838455727, 0.99436891104358249, 0.99436891104358249, -0.15467960838455727, -0.19887378220871649, 0.066291260736238825 }; static const std::size_t wv_rbio3_3_rec_lo_len = 8; static const double wv_rbio3_3_rec_hi[] = { 0, -0, 0.17677669529663689, -0.5303300858899106, 0.5303300858899106, -0.17677669529663689, 0, -0 }; static const std::size_t wv_rbio3_3_rec_hi_len = 8; static const double wv_rbio3_5_dec_lo[] = { 0, 0, 0, 0, 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689, 0, 0, 0, 0 }; static const std::size_t wv_rbio3_5_dec_lo_len = 12; static const double wv_rbio3_5_dec_hi[] = { 0.013810679320049757, 0.041432037960149271, -0.052480581416189075, -0.26792717880896527, 0.07181553246425873, 0.96674755240348298, -0.96674755240348298, -0.07181553246425873, 0.26792717880896527, 0.052480581416189075, -0.041432037960149271, -0.013810679320049757 }; static const std::size_t wv_rbio3_5_dec_hi_len = 12; static const double wv_rbio3_5_rec_lo[] = { -0.013810679320049757, 0.041432037960149271, 0.052480581416189075, -0.26792717880896527, -0.07181553246425873, 0.96674755240348298, 0.96674755240348298, -0.07181553246425873, -0.26792717880896527, 0.052480581416189075, 0.041432037960149271, -0.013810679320049757 }; static const std::size_t wv_rbio3_5_rec_lo_len = 12; static const double wv_rbio3_5_rec_hi[] = { 0, -0, 0, -0, 0.17677669529663689, -0.5303300858899106, 0.5303300858899106, -0.17677669529663689, 0, -0, 0, -0 }; static const std::size_t wv_rbio3_5_rec_hi_len = 12; static const double wv_rbio3_7_dec_lo[] = { 0, 0, 0, 0, 0, 0, 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689, 0, 0, 0, 0, 0, 0 }; static const std::size_t wv_rbio3_7_dec_lo_len = 16; static const double wv_rbio3_7_dec_hi[] = { -0.0030210861012608843, -0.0090632583037826529, 0.016831765421310641, 0.074663985074019001, -0.031332978707362888, -0.301159125922835, 0.026499240945345469, 0.95164212189717856, -0.95164212189717856, -0.026499240945345469, 0.301159125922835, 0.031332978707362888, -0.074663985074019001, -0.016831765421310641, 0.0090632583037826529, 0.0030210861012608843 }; static const std::size_t wv_rbio3_7_dec_hi_len = 16; static const double wv_rbio3_7_rec_lo[] = { 0.0030210861012608843, -0.0090632583037826529, -0.016831765421310641, 0.074663985074019001, 0.031332978707362888, -0.301159125922835, -0.026499240945345469, 0.95164212189717856, 0.95164212189717856, -0.026499240945345469, -0.301159125922835, 0.031332978707362888, 0.074663985074019001, -0.016831765421310641, -0.0090632583037826529, 0.0030210861012608843 }; static const std::size_t wv_rbio3_7_rec_lo_len = 16; static const double wv_rbio3_7_rec_hi[] = { 0, -0, 0, -0, 0, -0, 0.17677669529663689, -0.5303300858899106, 0.5303300858899106, -0.17677669529663689, 0, -0, 0, -0, 0, -0 }; static const std::size_t wv_rbio3_7_rec_hi_len = 16; static const double wv_rbio3_9_dec_lo[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0.17677669529663689, 0.5303300858899106, 0.5303300858899106, 0.17677669529663689, 0, 0, 0, 0, 0, 0, 0, 0 }; static const std::size_t wv_rbio3_9_dec_lo_len = 20; static const double wv_rbio3_9_dec_hi[] = { 0.0006797443727836989, 0.0020392331183510968, -0.0050603192196119811, -0.020618912641105536, 0.014112787930175844, 0.09913478249423216, -0.012300136269419315, -0.32019196836077857, -0.0020500227115698858, 0.94212570067820678, -0.94212570067820678, 0.0020500227115698858, 0.32019196836077857, 0.012300136269419315, -0.09913478249423216, -0.014112787930175844, 0.020618912641105536, 0.0050603192196119811, -0.0020392331183510968, -0.0006797443727836989 }; static const std::size_t wv_rbio3_9_dec_hi_len = 20; static const double wv_rbio3_9_rec_lo[] = { -0.0006797443727836989, 0.0020392331183510968, 0.0050603192196119811, -0.020618912641105536, -0.014112787930175844, 0.09913478249423216, 0.012300136269419315, -0.32019196836077857, 0.0020500227115698858, 0.94212570067820678, 0.94212570067820678, 0.0020500227115698858, -0.32019196836077857, 0.012300136269419315, 0.09913478249423216, -0.014112787930175844, -0.020618912641105536, 0.0050603192196119811, 0.0020392331183510968, -0.0006797443727836989 }; static const std::size_t wv_rbio3_9_rec_lo_len = 20; static const double wv_rbio3_9_rec_hi[] = { 0, -0, 0, -0, 0, -0, 0, -0, 0.17677669529663689, -0.5303300858899106, 0.5303300858899106, -0.17677669529663689, 0, -0, 0, -0, 0, -0, 0, -0 }; static const std::size_t wv_rbio3_9_rec_hi_len = 20; static const double wv_rbio4_4_dec_lo[] = { 0, 0, -0.064538882628697058, -0.040689417609164058, 0.41809227322161724, 0.7884856164055829, 0.41809227322161724, -0.040689417609164058, -0.064538882628697058, 0 }; static const std::size_t wv_rbio4_4_dec_lo_len = 10; static const double wv_rbio4_4_dec_hi[] = { -0.03782845550726404, -0.023849465019556843, 0.11062440441843718, 0.37740285561283066, -0.85269867900889385, 0.37740285561283066, 0.11062440441843718, -0.023849465019556843, -0.03782845550726404, 0 }; static const std::size_t wv_rbio4_4_dec_hi_len = 10; static const double wv_rbio4_4_rec_lo[] = { 0.03782845550726404, -0.023849465019556843, -0.11062440441843718, 0.37740285561283066, 0.85269867900889385, 0.37740285561283066, -0.11062440441843718, -0.023849465019556843, 0.03782845550726404, 0 }; static const std::size_t wv_rbio4_4_rec_lo_len = 10; static const double wv_rbio4_4_rec_hi[] = { 0, -0, -0.064538882628697058, 0.040689417609164058, 0.41809227322161724, -0.7884856164055829, 0.41809227322161724, 0.040689417609164058, -0.064538882628697058, -0 }; static const std::size_t wv_rbio4_4_rec_hi_len = 10; static const double wv_rbio5_5_dec_lo[] = { 0, 0.013456709459118716, -0.0026949668801115071, -0.13670658466432914, -0.093504697400938863, 0.47680326579848425, 0.89950610974864842, 0.47680326579848425, -0.093504697400938863, -0.13670658466432914, -0.0026949668801115071, 0.013456709459118716 }; static const std::size_t wv_rbio5_5_dec_lo_len = 12; static const double wv_rbio5_5_dec_hi[] = { -0, 0.03968708834740544, -0.0079481086372403219, -0.054463788468236907, -0.34560528195603346, 0.73666018142821055, -0.34560528195603346, -0.054463788468236907, -0.0079481086372403219, 0.03968708834740544, -0, 0 }; static const std::size_t wv_rbio5_5_dec_hi_len = 12; static const double wv_rbio5_5_rec_lo[] = { 0, 0.03968708834740544, 0.0079481086372403219, -0.054463788468236907, 0.34560528195603346, 0.73666018142821055, 0.34560528195603346, -0.054463788468236907, 0.0079481086372403219, 0.03968708834740544, 0, 0 }; static const std::size_t wv_rbio5_5_rec_lo_len = 12; static const double wv_rbio5_5_rec_hi[] = { 0, -0.013456709459118716, -0.0026949668801115071, 0.13670658466432914, -0.093504697400938863, -0.47680326579848425, 0.89950610974864842, -0.47680326579848425, -0.093504697400938863, 0.13670658466432914, -0.0026949668801115071, -0.013456709459118716 }; static const std::size_t wv_rbio5_5_rec_hi_len = 12; static const double wv_rbio6_8_dec_lo[] = { 0, 0, 0, 0, 0.014426282505624435, 0.014467504896790148, -0.078722001062628819, -0.040367979030339923, 0.41784910915027457, 0.75890772945365415, 0.41784910915027457, -0.040367979030339923, -0.078722001062628819, 0.014467504896790148, 0.014426282505624435, 0, 0, 0 }; static const std::size_t wv_rbio6_8_dec_lo_len = 18; static const double wv_rbio6_8_dec_hi[] = { -0.0019088317364812906, -0.0019142861290887667, 0.016990639867602342, 0.01193456527972926, -0.04973290349094079, -0.077263173167204144, 0.09405920349573646, 0.42079628460982682, -0.82592299745840225, 0.42079628460982682, 0.09405920349573646, -0.077263173167204144, -0.04973290349094079, 0.01193456527972926, 0.016990639867602342, -0.0019142861290887667, -0.0019088317364812906, 0 }; static const std::size_t wv_rbio6_8_dec_hi_len = 18; static const double wv_rbio6_8_rec_lo[] = { 0.0019088317364812906, -0.0019142861290887667, -0.016990639867602342, 0.01193456527972926, 0.04973290349094079, -0.077263173167204144, -0.09405920349573646, 0.42079628460982682, 0.82592299745840225, 0.42079628460982682, -0.09405920349573646, -0.077263173167204144, 0.04973290349094079, 0.01193456527972926, -0.016990639867602342, -0.0019142861290887667, 0.0019088317364812906, 0 }; static const std::size_t wv_rbio6_8_rec_lo_len = 18; static const double wv_rbio6_8_rec_hi[] = { 0, -0, 0, -0, 0.014426282505624435, -0.014467504896790148, -0.078722001062628819, 0.040367979030339923, 0.41784910915027457, -0.75890772945365415, 0.41784910915027457, 0.040367979030339923, -0.078722001062628819, -0.014467504896790148, 0.014426282505624435, -0, 0, -0 }; static const std::size_t wv_rbio6_8_rec_hi_len = 18; // 小波映射表 static const std::unordered_map<std::string, WaveletCoeffs> wavelet_map = { { "db2", WaveletCoeffs{ wv_db2_dec_lo, wv_db2_dec_lo_len, wv_db2_dec_hi, wv_db2_dec_hi_len, wv_db2_rec_lo, wv_db2_rec_lo_len, wv_db2_rec_hi, wv_db2_rec_hi_len } }, { "db4", WaveletCoeffs{ wv_db4_dec_lo, wv_db4_dec_lo_len, wv_db4_dec_hi, wv_db4_dec_hi_len, wv_db4_rec_lo, wv_db4_rec_lo_len, wv_db4_rec_hi, wv_db4_rec_hi_len } }, { "db8", WaveletCoeffs{ wv_db8_dec_lo, wv_db8_dec_lo_len, wv_db8_dec_hi, wv_db8_dec_hi_len, wv_db8_rec_lo, wv_db8_rec_lo_len, wv_db8_rec_hi, wv_db8_rec_hi_len } }, { "db10", WaveletCoeffs{ wv_db10_dec_lo, wv_db10_dec_lo_len, wv_db10_dec_hi, wv_db10_dec_hi_len, wv_db10_rec_lo, wv_db10_rec_lo_len, wv_db10_rec_hi, wv_db10_rec_hi_len } }, { "db12", WaveletCoeffs{ wv_db12_dec_lo, wv_db12_dec_lo_len, wv_db12_dec_hi, wv_db12_dec_hi_len, wv_db12_rec_lo, wv_db12_rec_lo_len, wv_db12_rec_hi, wv_db12_rec_hi_len } }, { "db14", WaveletCoeffs{ wv_db14_dec_lo, wv_db14_dec_lo_len, wv_db14_dec_hi, wv_db14_dec_hi_len, wv_db14_rec_lo, wv_db14_rec_lo_len, wv_db14_rec_hi, wv_db14_rec_hi_len } }, { "db16", WaveletCoeffs{ wv_db16_dec_lo, wv_db16_dec_lo_len, wv_db16_dec_hi, wv_db16_dec_hi_len, wv_db16_rec_lo, wv_db16_rec_lo_len, wv_db16_rec_hi, wv_db16_rec_hi_len } }, { "db18", WaveletCoeffs{ wv_db18_dec_lo, wv_db18_dec_lo_len, wv_db18_dec_hi, wv_db18_dec_hi_len, wv_db18_rec_lo, wv_db18_rec_lo_len, wv_db18_rec_hi, wv_db18_rec_hi_len } }, { "db20", WaveletCoeffs{ wv_db20_dec_lo, wv_db20_dec_lo_len, wv_db20_dec_hi, wv_db20_dec_hi_len, wv_db20_rec_lo, wv_db20_rec_lo_len, wv_db20_rec_hi, wv_db20_rec_hi_len } }, { "sym2", WaveletCoeffs{ wv_sym2_dec_lo, wv_sym2_dec_lo_len, wv_sym2_dec_hi, wv_sym2_dec_hi_len, wv_sym2_rec_lo, wv_sym2_rec_lo_len, wv_sym2_rec_hi, wv_sym2_rec_hi_len } }, { "sym4", WaveletCoeffs{ wv_sym4_dec_lo, wv_sym4_dec_lo_len, wv_sym4_dec_hi, wv_sym4_dec_hi_len, wv_sym4_rec_lo, wv_sym4_rec_lo_len, wv_sym4_rec_hi, wv_sym4_rec_hi_len } }, { "sym6", WaveletCoeffs{ wv_sym6_dec_lo, wv_sym6_dec_lo_len, wv_sym6_dec_hi, wv_sym6_dec_hi_len, wv_sym6_rec_lo, wv_sym6_rec_lo_len, wv_sym6_rec_hi, wv_sym6_rec_hi_len } }, { "sym8", WaveletCoeffs{ wv_sym8_dec_lo, wv_sym8_dec_lo_len, wv_sym8_dec_hi, wv_sym8_dec_hi_len, wv_sym8_rec_lo, wv_sym8_rec_lo_len, wv_sym8_rec_hi, wv_sym8_rec_hi_len } }, { "sym10", WaveletCoeffs{ wv_sym10_dec_lo, wv_sym10_dec_lo_len, wv_sym10_dec_hi, wv_sym10_dec_hi_len, wv_sym10_rec_lo, wv_sym10_rec_lo_len, wv_sym10_rec_hi, wv_sym10_rec_hi_len } }, { "sym12", WaveletCoeffs{ wv_sym12_dec_lo, wv_sym12_dec_lo_len, wv_sym12_dec_hi, wv_sym12_dec_hi_len, wv_sym12_rec_lo, wv_sym12_rec_lo_len, wv_sym12_rec_hi, wv_sym12_rec_hi_len } }, { "sym14", WaveletCoeffs{ wv_sym14_dec_lo, wv_sym14_dec_lo_len, wv_sym14_dec_hi, wv_sym14_dec_hi_len, wv_sym14_rec_lo, wv_sym14_rec_lo_len, wv_sym14_rec_hi, wv_sym14_rec_hi_len } }, { "sym16", WaveletCoeffs{ wv_sym16_dec_lo, wv_sym16_dec_lo_len, wv_sym16_dec_hi, wv_sym16_dec_hi_len, wv_sym16_rec_lo, wv_sym16_rec_lo_len, wv_sym16_rec_hi, wv_sym16_rec_hi_len } }, { "sym18", WaveletCoeffs{ wv_sym18_dec_lo, wv_sym18_dec_lo_len, wv_sym18_dec_hi, wv_sym18_dec_hi_len, wv_sym18_rec_lo, wv_sym18_rec_lo_len, wv_sym18_rec_hi, wv_sym18_rec_hi_len } }, { "sym20", WaveletCoeffs{ wv_sym20_dec_lo, wv_sym20_dec_lo_len, wv_sym20_dec_hi, wv_sym20_dec_hi_len, wv_sym20_rec_lo, wv_sym20_rec_lo_len, wv_sym20_rec_hi, wv_sym20_rec_hi_len } }, { "coif1", WaveletCoeffs{ wv_coif1_dec_lo, wv_coif1_dec_lo_len, wv_coif1_dec_hi, wv_coif1_dec_hi_len, wv_coif1_rec_lo, wv_coif1_rec_lo_len, wv_coif1_rec_hi, wv_coif1_rec_hi_len } }, { "coif2", WaveletCoeffs{ wv_coif2_dec_lo, wv_coif2_dec_lo_len, wv_coif2_dec_hi, wv_coif2_dec_hi_len, wv_coif2_rec_lo, wv_coif2_rec_lo_len, wv_coif2_rec_hi, wv_coif2_rec_hi_len } }, { "coif3", WaveletCoeffs{ wv_coif3_dec_lo, wv_coif3_dec_lo_len, wv_coif3_dec_hi, wv_coif3_dec_hi_len, wv_coif3_rec_lo, wv_coif3_rec_lo_len, wv_coif3_rec_hi, wv_coif3_rec_hi_len } }, { "coif4", WaveletCoeffs{ wv_coif4_dec_lo, wv_coif4_dec_lo_len, wv_coif4_dec_hi, wv_coif4_dec_hi_len, wv_coif4_rec_lo, wv_coif4_rec_lo_len, wv_coif4_rec_hi, wv_coif4_rec_hi_len } }, { "coif5", WaveletCoeffs{ wv_coif5_dec_lo, wv_coif5_dec_lo_len, wv_coif5_dec_hi, wv_coif5_dec_hi_len, wv_coif5_rec_lo, wv_coif5_rec_lo_len, wv_coif5_rec_hi, wv_coif5_rec_hi_len } }, { "bior1.1", WaveletCoeffs{ wv_bior1_1_dec_lo, wv_bior1_1_dec_lo_len, wv_bior1_1_dec_hi, wv_bior1_1_dec_hi_len, wv_bior1_1_rec_lo, wv_bior1_1_rec_lo_len, wv_bior1_1_rec_hi, wv_bior1_1_rec_hi_len } }, { "bior1.3", WaveletCoeffs{ wv_bior1_3_dec_lo, wv_bior1_3_dec_lo_len, wv_bior1_3_dec_hi, wv_bior1_3_dec_hi_len, wv_bior1_3_rec_lo, wv_bior1_3_rec_lo_len, wv_bior1_3_rec_hi, wv_bior1_3_rec_hi_len } }, { "bior1.5", WaveletCoeffs{ wv_bior1_5_dec_lo, wv_bior1_5_dec_lo_len, wv_bior1_5_dec_hi, wv_bior1_5_dec_hi_len, wv_bior1_5_rec_lo, wv_bior1_5_rec_lo_len, wv_bior1_5_rec_hi, wv_bior1_5_rec_hi_len } }, { "bior2.2", WaveletCoeffs{ wv_bior2_2_dec_lo, wv_bior2_2_dec_lo_len, wv_bior2_2_dec_hi, wv_bior2_2_dec_hi_len, wv_bior2_2_rec_lo, wv_bior2_2_rec_lo_len, wv_bior2_2_rec_hi, wv_bior2_2_rec_hi_len } }, { "bior2.4", WaveletCoeffs{ wv_bior2_4_dec_lo, wv_bior2_4_dec_lo_len, wv_bior2_4_dec_hi, wv_bior2_4_dec_hi_len, wv_bior2_4_rec_lo, wv_bior2_4_rec_lo_len, wv_bior2_4_rec_hi, wv_bior2_4_rec_hi_len } }, { "bior2.6", WaveletCoeffs{ wv_bior2_6_dec_lo, wv_bior2_6_dec_lo_len, wv_bior2_6_dec_hi, wv_bior2_6_dec_hi_len, wv_bior2_6_rec_lo, wv_bior2_6_rec_lo_len, wv_bior2_6_rec_hi, wv_bior2_6_rec_hi_len } }, { "bior2.8", WaveletCoeffs{ wv_bior2_8_dec_lo, wv_bior2_8_dec_lo_len, wv_bior2_8_dec_hi, wv_bior2_8_dec_hi_len, wv_bior2_8_rec_lo, wv_bior2_8_rec_lo_len, wv_bior2_8_rec_hi, wv_bior2_8_rec_hi_len } }, { "bior3.1", WaveletCoeffs{ wv_bior3_1_dec_lo, wv_bior3_1_dec_lo_len, wv_bior3_1_dec_hi, wv_bior3_1_dec_hi_len, wv_bior3_1_rec_lo, wv_bior3_1_rec_lo_len, wv_bior3_1_rec_hi, wv_bior3_1_rec_hi_len } }, { "bior3.3", WaveletCoeffs{ wv_bior3_3_dec_lo, wv_bior3_3_dec_lo_len, wv_bior3_3_dec_hi, wv_bior3_3_dec_hi_len, wv_bior3_3_rec_lo, wv_bior3_3_rec_lo_len, wv_bior3_3_rec_hi, wv_bior3_3_rec_hi_len } }, { "bior3.5", WaveletCoeffs{ wv_bior3_5_dec_lo, wv_bior3_5_dec_lo_len, wv_bior3_5_dec_hi, wv_bior3_5_dec_hi_len, wv_bior3_5_rec_lo, wv_bior3_5_rec_lo_len, wv_bior3_5_rec_hi, wv_bior3_5_rec_hi_len } }, { "bior3.7", WaveletCoeffs{ wv_bior3_7_dec_lo, wv_bior3_7_dec_lo_len, wv_bior3_7_dec_hi, wv_bior3_7_dec_hi_len, wv_bior3_7_rec_lo, wv_bior3_7_rec_lo_len, wv_bior3_7_rec_hi, wv_bior3_7_rec_hi_len } }, { "bior3.9", WaveletCoeffs{ wv_bior3_9_dec_lo, wv_bior3_9_dec_lo_len, wv_bior3_9_dec_hi, wv_bior3_9_dec_hi_len, wv_bior3_9_rec_lo, wv_bior3_9_rec_lo_len, wv_bior3_9_rec_hi, wv_bior3_9_rec_hi_len } }, { "bior4.4", WaveletCoeffs{ wv_bior4_4_dec_lo, wv_bior4_4_dec_lo_len, wv_bior4_4_dec_hi, wv_bior4_4_dec_hi_len, wv_bior4_4_rec_lo, wv_bior4_4_rec_lo_len, wv_bior4_4_rec_hi, wv_bior4_4_rec_hi_len } }, { "bior5.5", WaveletCoeffs{ wv_bior5_5_dec_lo, wv_bior5_5_dec_lo_len, wv_bior5_5_dec_hi, wv_bior5_5_dec_hi_len, wv_bior5_5_rec_lo, wv_bior5_5_rec_lo_len, wv_bior5_5_rec_hi, wv_bior5_5_rec_hi_len } }, { "bior6.8", WaveletCoeffs{ wv_bior6_8_dec_lo, wv_bior6_8_dec_lo_len, wv_bior6_8_dec_hi, wv_bior6_8_dec_hi_len, wv_bior6_8_rec_lo, wv_bior6_8_rec_lo_len, wv_bior6_8_rec_hi, wv_bior6_8_rec_hi_len } }, { "rbio1.1", WaveletCoeffs{ wv_rbio1_1_dec_lo, wv_rbio1_1_dec_lo_len, wv_rbio1_1_dec_hi, wv_rbio1_1_dec_hi_len, wv_rbio1_1_rec_lo, wv_rbio1_1_rec_lo_len, wv_rbio1_1_rec_hi, wv_rbio1_1_rec_hi_len } }, { "rbio1.3", WaveletCoeffs{ wv_rbio1_3_dec_lo, wv_rbio1_3_dec_lo_len, wv_rbio1_3_dec_hi, wv_rbio1_3_dec_hi_len, wv_rbio1_3_rec_lo, wv_rbio1_3_rec_lo_len, wv_rbio1_3_rec_hi, wv_rbio1_3_rec_hi_len } }, { "rbio1.5", WaveletCoeffs{ wv_rbio1_5_dec_lo, wv_rbio1_5_dec_lo_len, wv_rbio1_5_dec_hi, wv_rbio1_5_dec_hi_len, wv_rbio1_5_rec_lo, wv_rbio1_5_rec_lo_len, wv_rbio1_5_rec_hi, wv_rbio1_5_rec_hi_len } }, { "rbio2.2", WaveletCoeffs{ wv_rbio2_2_dec_lo, wv_rbio2_2_dec_lo_len, wv_rbio2_2_dec_hi, wv_rbio2_2_dec_hi_len, wv_rbio2_2_rec_lo, wv_rbio2_2_rec_lo_len, wv_rbio2_2_rec_hi, wv_rbio2_2_rec_hi_len } }, { "rbio2.4", WaveletCoeffs{ wv_rbio2_4_dec_lo, wv_rbio2_4_dec_lo_len, wv_rbio2_4_dec_hi, wv_rbio2_4_dec_hi_len, wv_rbio2_4_rec_lo, wv_rbio2_4_rec_lo_len, wv_rbio2_4_rec_hi, wv_rbio2_4_rec_hi_len } }, { "rbio2.6", WaveletCoeffs{ wv_rbio2_6_dec_lo, wv_rbio2_6_dec_lo_len, wv_rbio2_6_dec_hi, wv_rbio2_6_dec_hi_len, wv_rbio2_6_rec_lo, wv_rbio2_6_rec_lo_len, wv_rbio2_6_rec_hi, wv_rbio2_6_rec_hi_len } }, { "rbio2.8", WaveletCoeffs{ wv_rbio2_8_dec_lo, wv_rbio2_8_dec_lo_len, wv_rbio2_8_dec_hi, wv_rbio2_8_dec_hi_len, wv_rbio2_8_rec_lo, wv_rbio2_8_rec_lo_len, wv_rbio2_8_rec_hi, wv_rbio2_8_rec_hi_len } }, { "rbio3.1", WaveletCoeffs{ wv_rbio3_1_dec_lo, wv_rbio3_1_dec_lo_len, wv_rbio3_1_dec_hi, wv_rbio3_1_dec_hi_len, wv_rbio3_1_rec_lo, wv_rbio3_1_rec_lo_len, wv_rbio3_1_rec_hi, wv_rbio3_1_rec_hi_len } }, { "rbio3.3", WaveletCoeffs{ wv_rbio3_3_dec_lo, wv_rbio3_3_dec_lo_len, wv_rbio3_3_dec_hi, wv_rbio3_3_dec_hi_len, wv_rbio3_3_rec_lo, wv_rbio3_3_rec_lo_len, wv_rbio3_3_rec_hi, wv_rbio3_3_rec_hi_len } }, { "rbio3.5", WaveletCoeffs{ wv_rbio3_5_dec_lo, wv_rbio3_5_dec_lo_len, wv_rbio3_5_dec_hi, wv_rbio3_5_dec_hi_len, wv_rbio3_5_rec_lo, wv_rbio3_5_rec_lo_len, wv_rbio3_5_rec_hi, wv_rbio3_5_rec_hi_len } }, { "rbio3.7", WaveletCoeffs{ wv_rbio3_7_dec_lo, wv_rbio3_7_dec_lo_len, wv_rbio3_7_dec_hi, wv_rbio3_7_dec_hi_len, wv_rbio3_7_rec_lo, wv_rbio3_7_rec_lo_len, wv_rbio3_7_rec_hi, wv_rbio3_7_rec_hi_len } }, { "rbio3.9", WaveletCoeffs{ wv_rbio3_9_dec_lo, wv_rbio3_9_dec_lo_len, wv_rbio3_9_dec_hi, wv_rbio3_9_dec_hi_len, wv_rbio3_9_rec_lo, wv_rbio3_9_rec_lo_len, wv_rbio3_9_rec_hi, wv_rbio3_9_rec_hi_len } }, { "rbio4.4", WaveletCoeffs{ wv_rbio4_4_dec_lo, wv_rbio4_4_dec_lo_len, wv_rbio4_4_dec_hi, wv_rbio4_4_dec_hi_len, wv_rbio4_4_rec_lo, wv_rbio4_4_rec_lo_len, wv_rbio4_4_rec_hi, wv_rbio4_4_rec_hi_len } }, { "rbio5.5", WaveletCoeffs{ wv_rbio5_5_dec_lo, wv_rbio5_5_dec_lo_len, wv_rbio5_5_dec_hi, wv_rbio5_5_dec_hi_len, wv_rbio5_5_rec_lo, wv_rbio5_5_rec_lo_len, wv_rbio5_5_rec_hi, wv_rbio5_5_rec_hi_len } }, { "rbio6.8", WaveletCoeffs{ wv_rbio6_8_dec_lo, wv_rbio6_8_dec_lo_len, wv_rbio6_8_dec_hi, wv_rbio6_8_dec_hi_len, wv_rbio6_8_rec_lo, wv_rbio6_8_rec_lo_len, wv_rbio6_8_rec_hi, wv_rbio6_8_rec_hi_len } }, }; // 获取小波系数的函数 inlineboolgetWaveletCoeffs(const std::string& name, WaveletCoeffs& coeffs){ auto it = wavelet_map.find(name); if (it != wavelet_map.end()) { coeffs = it->second; return true; } return false; }}/*******************************//*以上代码和DWT部分的一致,可以复用*//*******************************/inlineintcomputeMaxSWTLevels(std::size_t N){ if (N < 2) return 0; return static_cast<int>(std::floor(std::log2(static_cast<double>(N))));}staticdoublemaxAbs(const std::vector<double>& v){ double m = 0.0; for (double x : v) m = std::max(m, std::fabs(x)); return m;}staticdoublesumsq(const std::vector<double>& v){ double s = 0.0; for (double x : v) s += x * x; return s;}inlinevoidvectorAddInplace(std::vector<double>& a, const std::vector<double>& b){ const std::size_t N = a.size(); for (std::size_t i = 0; i < N; ++i) a[i] = (a[i] + b[i]) / 2.0; // divide by 2 per requirement}staticvoidrotateLeftInplace(std::vector<double>& v, int shift){ std::size_t N = v.size(); if (N == 0) return; // 处理负数:将负的左移转换为正的右移 int actual_shift = shift % static_cast<int>(N); if (actual_shift < 0) { actual_shift += static_cast<int>(N); } std::size_t left_shift = static_cast<std::size_t>(actual_shift); if (left_shift == 0) return; std::vector<double> tmp(N); for (std::size_t i = 0; i < N; ++i) { tmp[i] = v[(i + left_shift) % N]; } v.swap(tmp);}// circular convolution (periodic) using original filter and upsample factorstatic std::vector<double> circularConvolveSWT_aligned(const std::vector<double>& signal, const double* filter, std::size_t filter_len, std::size_t upsample, int delay_policy) { const std::size_t N = signal.size(); std::vector<double> out(N, 0.0); if (N == 0 || filter_len == 0) return out; // raw circular convolution y[n] = sum_k filter[k] * x[(n - k*ups) mod N] for (std::size_t n = 0; n < N; ++n) { double s = 0.0; for (std::size_t k = 0; k < filter_len; ++k) { std::size_t step = (k * upsample) % N; std::size_t idx = (n + N - step) % N; s += filter[k] * signal[idx]; } out[n] = s; } // compute delay and rotate left double delay_d = ((static_cast<double>(filter_len) - 1.0) * static_cast<double>(upsample)) / 2.0; std::size_t delay; if (delay_policy == 0) delay = static_cast<std::size_t>(std::floor(delay_d)); else if (delay_policy == 1) delay = static_cast<std::size_t>(std::llround(delay_d)); else delay = static_cast<std::size_t>(std::ceil(delay_d)); std::cout << "Filter Length:" << filter_len << "," << "delay: " << delay << "\n"; if (delay % N != 0) rotateLeftInplace(out, delay % N); return out;}static std::vector<double> circularConvolveNoRotate(const std::vector<double>& signal, const double* filter, std::size_t filter_len, std::size_t upsample, int delay_policy, std::size_t& out_delay_int) { const std::size_t N = signal.size(); std::vector<double> out(N, 0.0); if (N == 0 || filter_len == 0) { out_delay_int = 0; return out; } for (std::size_t n = 0; n < N; ++n) { double s = 0.0; for (std::size_t k = 0; k < filter_len; ++k) { std::size_t step = (k * upsample) % N; std::size_t idx = (n + N - step) % N; s += filter[k] * signal[idx]; } out[n] = s; } double delay_d = ((static_cast<double>(filter_len) - 1.0) * static_cast<double>(upsample)) / 2.0; std::size_t delay; if (delay_policy == 0) delay = static_cast<std::size_t>(std::floor(delay_d)); else if (delay_policy == 1) delay = static_cast<std::size_t>(std::llround(delay_d)); else delay = static_cast<std::size_t>(std::ceil(delay_d)); out_delay_int = delay % N; return out;}// ---------------- SWT decompose / reconstruct ----------------enum class DelayPolicy { FLOOR = 0, ROUND = 1, CEIL = 2 };voidswt_decompose(const std::vector<double>& input, const WaveletCoeffs& coeffs, int J, std::vector<std::vector<double>>& details, std::vector<double>& approx, DelayPolicy delay_policy){ const std::size_t N = input.size(); if (N == 0) return; int maxJ = computeMaxSWTLevels(N); if (J > maxJ) { std::cerr << "[Warning] requested J = " << J << " > max = " << maxJ << ", clipped.\n"; J = maxJ; } details.clear(); details.resize(J); std::vector<double> curr = input; for (int j = 1; j <= J; ++j) { std::size_t upsample = static_cast<std::size_t>(1) << (j - 1); //采样因子随层级按 2 的幂增长 std::vector<double> low, high; try { low = circularConvolveSWT_aligned(curr, coeffs.dec_lo, coeffs.dec_lo_len, upsample, static_cast<int>(delay_policy)); high = circularConvolveSWT_aligned(curr, coeffs.dec_hi, coeffs.dec_hi_len, upsample, static_cast<int>(delay_policy)); } catch (const std::exception& e) { std::cerr << "Exception in circularConvolveSWT_aligned: " << e.what() << "\n" << "Falling back to circular conv.\n"; } std::cout << "Decompose layer " << j << " ups=" << upsample << " dec_lo_len=" << coeffs.dec_lo_len << " dec_hi_len=" << coeffs.dec_hi_len << " low.max=" << maxAbs(low) << " low.energy=" << sumsq(low) << " high.max=" << maxAbs(high) << " high.energy=" << sumsq(high) << "\n\n"; details[j - 1] = std::move(high); curr = std::move(low); } approx = std::move(curr);}std::vector<double> swt_reconstruct(const std::vector<double>& approx, const std::vector<std::vector<double>>& details, const WaveletCoeffs& coeffs, DelayPolicy delay_policy){ std::vector<double> curr = approx; int J = static_cast<int>(details.size()); const std::size_t N = approx.size(); for (int j = J; j >= 1; --j) { std::size_t upsample = static_cast<std::size_t>(1) << (j - 1); std::vector<double> a, d; try { a = circularConvolveSWT_aligned(curr, coeffs.rec_lo, coeffs.rec_lo_len, upsample, static_cast<int>(delay_policy)); d = circularConvolveSWT_aligned(details[j - 1], coeffs.rec_hi, coeffs.rec_hi_len, upsample, static_cast<int>(delay_policy)); } catch (const std::exception& e) { std::cerr << "Exception in reconstruct convolve: " << e.what() << "\nFalling back to circular conv.\n"; } std::cout << "Reconstruct layer " << j << " ups=" << upsample << " rec_lo_len=" << coeffs.rec_lo_len << " rec_hi_len=" << coeffs.rec_hi_len << " a.max=" << maxAbs(a) << " a.energy=" << sumsq(a) << " d.max=" << maxAbs(d) << " d.energy=" << sumsq(d) << "\n"; vectorAddInplace(a, d); // does (a + d)/2 per element curr = std::move(a); std::cout << " after add combined.max=" << maxAbs(curr) << " combined.energy=" << sumsq(curr) << "\n"; } // 延迟补偿 rotateLeftInplace(curr, -1); return curr;}// Diagnostics & helpers (same as before)staticdoublecomputeMSE(const std::vector<double>& a, const std::vector<double>& b){ std::size_t N = a.size(); double mse = 0.0; for (std::size_t i = 0; i < N; ++i) { double e = a[i] - b[i]; mse += e * e; } return mse / static_cast<double>(N);}staticintcircularCrossCorrLag(const std::vector<double>& orig, const std::vector<double>& rec){ std::size_t N = orig.size(); if (N == 0) return 0; double maxcorr = -1e300; int bestlag = 0; for (std::size_t lag = 0; lag < N; ++lag) { double s = 0.0; for (std::size_t i = 0; i < N; ++i) s += orig[i] * rec[(i + lag) % N]; if (s > maxcorr) { maxcorr = s; bestlag = static_cast<int>(lag); } } if (bestlag > static_cast<int>(N / 2)) bestlag -= static_cast<int>(N); return bestlag;}staticboolwriteCSV(const std::string& filename, const std::vector<double>& original, const std::vector<double>& reconstructed){ std::ofstream ofs(filename); if (!ofs) return false; ofs << "index,original,reconstructed\n"; ofs << std::fixed << std::setprecision(10); std::size_t N = original.size(); for (std::size_t i = 0; i < N; ++i) ofs << i << "," << original[i] << "," << reconstructed[i] << "\n"; return true;}static std::vector<double> generateTestSignal(std::size_t N, double noise_std = 0.5){ std::vector<double> s(N, 0.0); std::mt19937_64 rng(123456789); std::normal_distribution<double> nd(0.0, noise_std); for (std::size_t i = 0; i < N; ++i) { double t = static_cast<double>(i) / static_cast<double>(N); s[i] = 1.0 * std::sin(2.0 * M_PI * 5.0 * t) + 0.5 * std::sin(2.0 * M_PI * 20.0 * t) + +nd(rng); } return s;}staticvoiddeltaTest(const WaveletCoeffs& coeffs, std::size_t N, DelayPolicy policy){ std::vector<double> delta(N, 0.0); delta[0] = 1.0; std::vector<std::vector<double>> details; std::vector<double> approx; int J = 2; swt_decompose(delta, coeffs, J, details, approx, policy); auto rec = swt_reconstruct(approx, details, coeffs, policy); rotateLeftInplace(rec, -1); // Note: reconstruct already does (a+d)/2 per stage; do NOT divide again here. std::cout << "[Delta test] rec.max=" << maxAbs(rec) << " mse=" << computeMSE(delta, rec) << "\n";}intmain(){ /** 'db2', 'db4', 'db8', 'db10', 'db12', 'db14', 'db16', 'db18', 'db20', 'sym2', 'sym4', 'sym6', 'sym8', 'sym10', 'sym12', 'sym14', 'sym16', 'sym18', 'sym20', 'coif1', 'coif2', 'coif3', 'coif4', 'coif5', 'bior1.1', 'bior1.3', 'bior1.5', 'bior2.2', 'bior2.4', 'bior2.6', 'bior2.8', 'bior3.1', 'bior3.3', 'bior3.5', 'bior3.7', 'bior3.9', 'bior4.4', 'bior5.5', 'bior6.8', 'rbio1.1', 'rbio1.3', 'rbio1.5', 'rbio2.2', 'rbio2.4', 'rbio2.6', 'rbio2.8', 'rbio3.1', 'rbio3.3', 'rbio3.5', 'rbio3.7', 'rbio3.9', 'rbio4.4', 'rbio5.5', 'rbio6.8', 'haar', 'db1', */ std::string wavelet_name = "haar"; /*Choose a filter's name*/ int requested_J = 6; std::size_t N = 1024; DelayPolicy policy = DelayPolicy::ROUND; std::string out_csv = R"(Your_Path_to_Save_SWT_Reconstruction_Result\reconstruction_result.csv)"; WaveletCoeffs coeffs; // 先判断是否为 haar/db1,直接生成系数 if (wavelet_name == "haar" || wavelet_name == "db1") { double s = 1.0 / std::sqrt(2.0); // 注意:这里需要分配动态内存,因为 coeffs 中的指针指向常量数组 // 但为了简单,可以声明静态数组 static double dec_lo_arr[] = { s, s }; static double dec_hi_arr[] = { -s, s }; static double rec_lo_arr[] = { s, s }; static double rec_hi_arr[] = { s, -s }; coeffs.dec_lo = dec_lo_arr; coeffs.dec_lo_len = 2; coeffs.dec_hi = dec_hi_arr; coeffs.dec_hi_len = 2; coeffs.rec_lo = rec_lo_arr; coeffs.rec_lo_len = 2; coeffs.rec_hi = rec_hi_arr; coeffs.rec_hi_len = 2; } else if (!WaveletDatabase::getWaveletCoeffs(wavelet_name, coeffs)) { std::cerr << "Wavelet not found: " << wavelet_name << "\n"; return 1; } //std::cout << "Running delta test...\n"; //deltaTest(coeffs, N, policy); std::vector<double> signal = generateTestSignal(N, 0.5); std::vector<std::vector<double>> details; std::vector<double> approx; //分解 swt_decompose(signal, coeffs, requested_J, details, approx, policy); //重建 std::vector<double> reconstructed = swt_reconstruct(approx, details, coeffs, policy); double mse = computeMSE(signal, reconstructed); double maxo = maxAbs(signal); double maxr = maxAbs(reconstructed); int lag = circularCrossCorrLag(signal, reconstructed); std::cout << "Final results: J=" << requested_J << " N=" << N << "\n"; std::cout << "MSE=" << mse << " maxRec/maxOrig=" << (maxr / (maxo > 0 ? maxo : 1.0)) << " lag(samples)=" << lag << "\n"; writeCSV(out_csv, signal, reconstructed); std::cout << "Wrote CSV: " << out_csv << "\n"; return 0;}