#include #include #include #include #include #include #include "firpm/barycentric.h" #include "firpm/pm.h" #include "firpm/cheby.h" static void printInfo(pmoutput_t &output, long double eps) { if (output.q < eps) { std::cout << "Final delta = " << output.delta << std::endl; std::cout << "Iteration count = " << output.iter << std::endl; } else { std::cout << "Iteration count = NC\n"; } } int main(int argc, char **argv) { std::cout << "START Parks-McClellan with uniform initialization\n"; pmoutput_t output2 = firpm(511, {0.000000000000000e+00, 3.333333333333333e-04, 3.333333333333333e-04, 2.100000000000000e-02, 1.123333333333333e-01, 1.000000000000000e+00}, {1.000000000000000e+00, 1.000000379959538e+00, 1.000000379959538e+00, 1.001509250092234e+00, 0.000000000000000e+00, 0.000000000000000e+00}, {1, 1, 1}); printInfo(output2, 0.01); std::cout << "FINISH Parks-McClellan with uniform initialization\n"; std::cout << std::endl; std::cout << "START Parks-McClellan with uniform initialization\n"; pmoutput_t output3 = firpm(511, {0.000000000000000e+00, 2.100000000000000e-02, 1.123333333333333e-01, 1.000000000000000e+00}, {1.000000000000000e+00, 1.001509250092234e+00, 0.000000000000000e+00, 0.000000000000000e+00}, {1, 1}); printInfo(output3, 0.01); std::cout << "FINISH Parks-McClellan with uniform initialization\n"; exit(0); }