(the format used for reading and writing linear and quadratic programs)
There is a class that represents the solution of a linear or quadratic program. An instance of this class is returned by any of the solution functions below.
We offer a number of predefined models for the above program concepts. The following two are simultaneously models for all four concepts and are probably the most convenient models; they allow you to construct linear or quadratic programs entry by entry, or from streams in MPSFormat. At any time, you can query these programs for linearity and nonnegativity and thus select the appropriate solution function.
(for linear and quadratic programs that own their data and are built entry-wise)
(for linear and quadratic programs read from an input stream in MPSFormat; the constructed program can also be manipulate entry-wise)
Then there are specific models for any of the four program concepts above; these are useful if you want to maintain the program data yourself, since they simply wrap random access iterators over the program data and involve no further copying of data.
CGAL::Quadratic_program_from_iterators<A_it, B_it, R_it, FL_it, L_it, FU_it, U_it, D_it, C_it>
(for quadratic programs that wrap given iterators, without copying data)
CGAL::Linear_program_from_iterators<A_it, B_it, R_it, FL_it, L_it, FU_it, U_it, C_it>
(for linear programs wrapping given iterators)
CGAL::Nonnegative_quadratic_program_from_iterators<A_it, B_it, R_it, D_it, C_it>
(for nonnegative quadratic programs, wrapping given iterators)
CGAL::Nonnegative_linear_program_from_iterators<A_it, B_it, R_it, C_it>
(for nonnegative linear programs, wrapping given iterators)
In case you want to construct a program from complicated iterators (whose types you don't know, or simply don't want to bother with), we provide four makers.
There are four functions to solve a program, one for each program concept.
The solution process can customized by passing an object of the class
Programs can be written to an output stream in MPSFormat, using one of the following four functions.
|Linear_program_from_iterators<A_it, B_it, R_it, FL_it, L_it, FU_it, U_it, C_it>|
|Nonnegative_linear_program_from_iterators<A_it, B_it, R_it, C_it>|
|Nonnegative_quadratic_program_from_iterators<A_it, B_it, R_it, D_it, C_it>|
|Quadratic_program_from_iterators<A_it, B_it, R_it, FL_it, L_it, FU_it, U_it, D_it, C_it>|