#include <cassert>
#include <CGAL/QP_models.h>
#include <CGAL/QP_functions.h>
#ifdef CGAL_USE_GMP
#else
#endif
<int**,
int*,
int*>
Program;
int main() {
int Ax1[] = { 1, -1};
int Ax2[] = {-2, 1};
int* A[] = {Ax1, Ax2};
int b[] = {-1, 2};
int c[] = {-1, -2};
Program lp (2, 2, A, b, r, c);
assert (s.is_unbounded());
Solution::Unboundedness_certificate_iterator w =
s.unboundedness_certificate_begin();
assert (ET(w[0]) >= 0);
assert (ET(w[1]) >= 0);
assert (A[0][0] * ET(w[0]) + A[1][0] * ET(w[1]) <= 0);
assert (A[0][1] * ET(w[0]) + A[1][1] * ET(w[1]) <= 0);
assert (c[0] * ET(w[0]) + c[1] * ET(w[1]) < 0);
return 0;
}
An object of class Nonnegative_linear_program_from_iterators describes a linear program of the form.
Definition: QP_models.h:314
An object of class Quadratic_program_solution represents the solution of a linear or convex quadratic...
Definition: QP_solution.h:65
Quadratic_program_solution< ET > solve_nonnegative_linear_program(const NonnegativeLinearProgram &lp, const ET &, const Quadratic_program_options &options=Quadratic_program_options())
This function solves a nonnegative linear program, using some exact Integral Domain ET for its comput...