#include <CGAL/Polynomial.h>
#include <CGAL/Polynomial_traits_d.h>
#include <CGAL/Polynomial_type_generator.h>
int main(){
typedef PT_2::Coefficient_type Poly_1;
typedef PT_2::Innermost_coefficient_type Integer;
PT_2::Construct_polynomial construct_polynomial;
Poly_2 dc;
Poly_2 two(2);
std::cout << "A constant polynomial: " << two << std::endl;
std::list<Poly_1> univariate_coeffs;
univariate_coeffs.push_back(Poly_1(3));
univariate_coeffs.push_back(Poly_1(0));
univariate_coeffs.push_back(Poly_1(5));
Poly_2 F =
construct_polynomial(univariate_coeffs.begin(),univariate_coeffs.end());
std::cout << "The bivariate polynomial F: " << F << std::endl;
std::list<std::pair<CGAL::Exponent_vector, Integer> > innermost_coeffs;
Poly_2 G =
construct_polynomial(innermost_coeffs.begin(),innermost_coeffs.end());
std::cout << "The bivariate polynomial G: " << G << std::endl;
PT_2::Shift shift;
Poly_2 x = shift(Poly_2(1),1,0);
Poly_2 y = shift(Poly_2(1),1,1);
Poly_2 H = 5 * x * y + 3 * y * y;
std::cout << "The bivariate polynomial H: " << H << std::endl;
}
For a given (multivariate) monomial the vector of its exponents is called the exponent vector.
Definition: Exponent_vector.h:35
A model of concept PolynomialTraits_d
Definition: Polynomial_traits_d.h:13
Mode set_pretty_mode(std::ios &s)