#include <cassert>
#include <vector>
#include <CGAL/Cartesian_d.h>
#include "solve_convex_hull_containment_lp2.h"
 
typedef CGAL::Cartesian_d<double> Kernel_d;
typedef Kernel_d::Point_d Point_d;
 
int main()
{
  std::vector<Point_d> points;
  
  points.push_back (Point_d (1, 0)); 
  points.push_back (Point_d (4, 1)); 
  points.push_back (Point_d (4, 4)); 
  points.push_back (Point_d (2, 3)); 
 
  
  for (int i=0; i<=4; ++i)
    for (int j=0; j<=4; ++j) {
      Point_d p (i, j);
      Solution s = solve_convex_hull_containment_lp
      std::cout << p;
      if (s.is_infeasible())
        std::cout << " is not in the convex hull\n";
      else {
        assert (s.is_optimal());
        std::cout << " is a convex combination of the points ";
        Solution::Index_iterator it = s.basic_variable_indices_begin();
        Solution::Index_iterator end = s.basic_variable_indices_end();
        for (; it != end; ++it) std::cout << *it << " ";
        std::cout << std::endl;
      }
    }
  return 0;
}
An object of class Quadratic_program_solution represents the solution of a linear or convex quadratic...
Definition: QP_solution.h:65