Example Polynom usage
- Author
- MIP
#include <Base/Math/Polynom.hh>
using namespace BIAS;
using namespace std;
for (
unsigned int i=0; i<p.
GetOrder(); i++){
}
cout<< endl;
}
int main()
{
a[0]=2;
a[1]=1;
b[0]=1;
b[1]=2;
b[2]=2;
b[3]=3;
double z = 2.;
c= a+b;
d= b-a;
e= a-b;
f= a*b;
g= z*b;
h= b*z;
i+=h;
j-=h;
k=a;
k*=b;
cout << "polynom a: ";printPolynom(a);
cout << "polynom b: ";printPolynom(b);
cout << "double z: " << z << endl;
cout << endl;
cout << "polynom a+b: ";printPolynom(c);
cout << "polynom b-a: ";printPolynom(d);
cout << "polynom a-b: ";printPolynom(e);
cout << "polynom a*b: ";printPolynom(f);
cout << "polynom z*b: ";printPolynom(g);
cout << "polynom b*z: ";printPolynom(h);
cout << "polynom i+=h: (should be b*z)";printPolynom(i);
cout << "polynom j-=h: (should be -(b*z))";printPolynom(j);
cout << "polynom k=a k*=b (should be a*b)";printPolynom(k);
}