#include <CGAL/Polynomial.h>
#include <CGAL/Polynomial_traits_d.h>
#include <CGAL/Polynomial_type_generator.h>
int main(){
Poly_3 x = PT_3::Shift()(Poly_3(1),1,0);
Poly_3 y = PT_3::Shift()(Poly_3(1),1,1);
Poly_3 z = PT_3::Shift()(Poly_3(1),1,2);
Poly_3 F = x*y*y*z*z*z;
std::cout << "The trivariate polynomial F: " << F << std::endl;
std::cout << std::endl;
std::cout <<
"x and z swapped: "<<
swap(F,0,2)
<< std::endl;
std::cout <<
"x and y swapped: "<<
swap(F,0,1)
<< std::endl << std::endl;
std::cout << "x moved to outermost position : "
<< std::endl;
std::cout << "Same as swap(swap(F,0,1),1,2) : "
<< std::endl;
std::cout << "Same as the permutation (0,1,2)->(2,0,1): ";
std::vector<int> perm;
perm.push_back(2);perm.push_back(0);perm.push_back(1);
std::cout <<
permute(F,perm.begin(),perm.end())
<< std::endl;
}