#include <cassert>
#include <vector>
#include <CGAL/Cartesian_d.h>
#include "solve_convex_hull_containment_lp.h"
 
#ifdef CGAL_USE_GMP
#else
#endif
 
typedef CGAL::Cartesian_d<double> Kernel_d;
typedef Kernel_d::Point_d Point_d;
 
bool is_in_convex_hull (const Point_d& p,
                        std::vector<Point_d>::const_iterator begin,
                        std::vector<Point_d>::const_iterator end)
{
    solve_convex_hull_containment_lp (p, begin, end, ET(0));
}
 
int main()
{
  std::vector<Point_d> points;
  
  points.push_back (Point_d ( 0.0,  0.0));
  points.push_back (Point_d (10.0,  0.0));
  points.push_back (Point_d ( 0.0, 10.0));
  for (int i=0; i<=10; ++i)
    for (int j=0; j<=10; ++j) {
      
      bool contained = is_in_convex_hull
        (Point_d (i, j), points.begin(), points.end());
      assert (contained == (i+j<=10));
    }
 
  return 0;
}
An object of class Quadratic_program_solution represents the solution of a linear or convex quadratic...
Definition: QP_solution.h:65
bool is_infeasible() const
returns true iff the associated program is infeasible.