Developer documentation

polynomial_mv_test.cpp
# include <iostream>
int main(int argc, char** argv)
{
using namespace mmx;
// typedef polynomial< double, with<Monomials > > Tensor;
// typedef polynomial< Polynomial, with<Monomials> > TensorPol;
// typedef polynomial< Tensor, with<Sparse, LexRevDegree> > PolTensor;
// typedef polynomial< Polynomial, with<Sparse,LexRevDegree> > PolPol;
Polynomial f("t^2+u^2*t^2+u^2+3*u*t+u-1");
std::cout << "f : " << f << std::endl;
PolynomialR fr("t^2+u^2*t^2+u^2+3*u*t+u-1");
std::cout << "f : " << fr << std::endl;
std::vector<double> t(2); t[0]=1; t[1]=1;
double r=0; (void) r;
for(unsigned i=0;i<1000000; i++) r=f.at(t);
std::cout << "f(1,1) : " << f.at(t) << std::endl;
std::cout << "f(1,1) : " << fr.at(t) << std::endl;
std::cout << "f : " << s << std::endl;
// TensorPol g(1,2);
// std::cout << "g : " << g<<std::endl;
// g[0]=s[0]; g[1]=s[1]; g[2]=s[2];
// std::cout << "g : " << g<<std::endl;
// return 0;
}
Home