|
@@ -0,0 +1,40 @@
|
|
|
+#include "modules/OrthPol.h"
|
|
|
+#include <iomanip>
|
|
|
+#include <string>
|
|
|
+
|
|
|
+int main()
|
|
|
+{ std::cout << "Chebyshev Polynomial of the first kind" << std::endl;
|
|
|
+std::cout << "------------------------------------------------------------------------" << std::endl;
|
|
|
+ std::cout << std::setw(2) << "n ";
|
|
|
+ for (int j=1; j <=5; j++)
|
|
|
+ {
|
|
|
+ if (j == 5)
|
|
|
+ {
|
|
|
+ std::cout << std::setw(5) << std::left << std::setprecision(8) << j * 0.2 << std::endl;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ std::cout << std::setw(5) << std::left << std::setprecision(8) << j * 0.2 << " ";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ std::cout << "------------------------------------------------------------------------" << std::endl;
|
|
|
+ for (int i=0; i<=20; ++i)
|
|
|
+ {
|
|
|
+ std::cout << std::setw(2) << i << " ";
|
|
|
+ for (int j=1; j <=5; ++j)
|
|
|
+ {
|
|
|
+
|
|
|
+ std::vector<double> res = OrthPol(1, i, j*0.2);
|
|
|
+ if (j == 5)
|
|
|
+ {
|
|
|
+ std::cout << std::to_string(res[0]).substr(0,8) << std::endl;
|
|
|
+ //std::cout << std::setw(10) << std::right << std::setprecision(8) << res[0] << std::endl;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ std::cout << std::to_string(res[0]).substr(0,8) << " ";
|
|
|
+ //std::cout << std::setw(10) << std::right << std::setprecision(8) << res[0] << " " ;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|