Files Classes Functions Hierarchy
00001 #include <iostream> 00002 using namespace std; 00003 00004 #include <bernstein.h> 00005 #include <bernsteintest.h> 00006 00007 00008 void bernsteintest::test01() 00009 { 00010 cout << "Bernstein Polynomial Test" << endl; 00011 cout << "Enter n, i" << endl; 00012 uint n,i; 00013 cin >> n >> i; 00014 00015 bool flag(true); 00016 00017 double t; 00018 cout << "Enter t=-1 to terminate loop." << endl; 00019 00020 bernsteinPoly bp(n,i); 00021 double res; 00022 00023 for ( ; flag; ) 00024 { 00025 cout << "Enter t" << endl; 00026 cin >> t; 00027 00028 if (t==-1.0) 00029 { 00030 flag=false; 00031 continue; 00032 } 00033 00034 bp.eval(res,t); 00035 cout << SHOW(res) << endl; 00036 } 00037 } 00038 00039 00040 00041 00042
1.5.8