| 1 | #include <kernel/Poly.h> |
| 2 | |
| 3 | void testPoly(){ |
| 4 | Poly p(1,currRing); |
| 5 | Poly p2(2,currRing); |
| 6 | p.print(); |
| 7 | p2.print(); |
| 8 | (p+p2).print(); |
| 9 | p2.print(); |
| 10 | (p+=p).print(); |
| 11 | p2.print(); |
| 12 | std::vector<int> exp(3); |
| 13 | exp[0]=1; |
| 14 | Poly p3(exp,currRing); |
| 15 | exp[1]=2; |
| 16 | Poly p4(exp,currRing); |
| 17 | Poly p5=p; |
| 18 | Poly p6=(p+p2+p3+p4+p5); |
| 19 | PolyInputIterator<Poly> it=p6.begin(); |
| 20 | p6.print(); |
| 21 | while(it!=p6.end()){ |
| 22 | |
| 23 | it->print(); |
| 24 | |
| 25 | it++; |
| 26 | } |
| 27 | |
| 28 | p4*=p4; |
| 29 | p4.print(); |
| 30 | p2=p*p4; |
| 31 | p2.print(); |
| 32 | p.print(); |
| 33 | p4.print(); |
| 34 | |
| 35 | } |