cgal
cgal copied to clipboard
How to get resulted variables as 'double' type
How to get variables, s(0) ~ s(4), as double?
For example,,
double s0_tmp = *s.variable_numerators_begin(); double s1_tmp = *(s.variable_numerators_begin()+1); ...
It's not working.
( the type is ↓ typedef CGAL::Gmpzf ET; CGAL::Quadratic_program_solution < CGAL::Gmpzf > s = CGAL::solve_quadratic_program(qp, ET()); )
Use to_double().
Ex.
CGAL::Gmpzf tmp = *s.variable_numerators_begin(); double d_tmp = tmp.to_double(); std::cout << d_tmp << std::endl;
Use to_double().
Ex.
CGAL::Gmpzf tmp = *s.variable_numerators_begin(); double d_tmp = tmp.to_double(); std::cout << d_tmp << std::endl;
Thanks!!