NonnegativeQuadraticProgram
Definition
A model of NonnegativeQuadraticProgram describes a convex quadratic program of the form
in n real variables x=(x0,...,xn-1).
Here,
- A is an m × n matrix (the constraint matrix),
- b is an m-dimensional vector (the right-hand side),
- ~ is an m-dimensional vector of relations
from { , =, },
- D is a symmetric positive-semidefinite n × n matrix (the
quadratic objective function),
- c is an n-dimensional vector (the linear objective
function), and
- c0 is a constant.
The description is given by appropriate random-access
iterators over the program data, see below. The program therefore
comes in dense representation which includes zero entries.
Has Models
Quadratic_program<NT>
Quadratic_program_from_mps<NT>
Nonnegative_quadratic_program_from_iterators<A_it, B_it, R_it, FL_it, L_it, FU_it, U_it, D_it, C_it>
Types
NonnegativeQuadraticProgram::A_iterator
|
|
A random access iterator type to go
columnwise over the constraint matrix A. The value type
is a random access iterator type for an individual column that
goes over the entries in that column.
|
|
NonnegativeQuadraticProgram::B_iterator
|
|
A random access iterator type to go over
the entries of the right-hand side b.
|
|
NonnegativeQuadraticProgram::R_iterator
|
|
A random access iterator type to go over the
relations ~ . The value type of R_iterator is
CGAL::Comparison_result.
|
|
NonnegativeQuadraticProgram::D_iterator
|
|
A random access iterator type to go rowwise
over the matrix 2D. The value type
is a random access iterator type for an individual row that
goes over the entries in that row, up to (and including) the
entry on the main diagonal.
|
|
NonnegativeQuadraticProgram::C_iterator
|
|
A random access iterator type to go over the
entries of the linear objective function vector c.
|
Operations
int
|
qp.get_n ()
|
returns the number n of variables (number
of columns of A) in qp.
|
|
int
|
qp.get_m ()
|
returns the number m of constraints
(number of rows of A) in qp.
|
|
A_iterator
|
qp.get_a ()
|
returns an iterator over the columns
of A. The corresponding past-the-end iterator is get_a()+get_n().
For j=0,...,n-1, *(get_a()+j) is a random access
iterator for column j.
|
|
B_iterator
|
qp.get_b ()
|
returns an iterator over the entries
of b. The corresponding past-the-end iterator is
get_b()+get_m().
|
|
R_iterator
|
qp.get_r ()
|
returns an iterator over the entries
of ~ . The corresponding past-the-end iterator is
get_r()+get_m().
The value CGAL::SMALLER stands
for , CGAL::EQUAL stands for =, and CGAL::LARGER
stands for .
|
|
D_iterator
|
qp.get_d ()
|
returns an iterator over the rows of
2D. The corresponding past-the-end iterator is get_d()+get_n().
For i=0,...,n-1, *(get_d()+i) is a random access
iterator for the entries in row i below or on the diagonal.
The valid range of this iterator is
guaranteed to have length i+1 but not more. Values to the right
of the diagonal are deduced from the symmetry requirement on D.
|
|
C_iterator
|
qp.get_c ()
|
returns an iterator over the entries
of c. The corresponding past-the-end iterator is
get_c()+get_n().
|
|
std::iterator_traits<C_iterator>::value_type
|
|
qp.get_c0 ()
|
returns the constant term c0 of the objective function.
|
Requirements
The value types of all iterator types (nested iterator types,
respectively, for A_iterator and D_iterator) must be
convertible to some common IntegralDomain ET.
See Also
The models
Quadratic_program<NT>
Quadratic_program_from_mps<NT>
Nonnegative_quadratic_program_from_iterators<A_it, B_it, R_it, D_it, C_it>
and the other concepts
QuadraticProgram
LinearProgram
NonnegativeLinearProgram