Processing math: 100%
CGAL 4.4 - Linear and Quadratic Programming Solver
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
NonnegativeLinearProgram Concept Reference

Definition

A model of NonnegativeLinearProgram describes a linear program of the form.

(QP)minimizecTx+c0subject toAxb,x0

in n real variables x=(x0,,xn1). 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 {,=,},
  • 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:

CGAL::Quadratic_program<NT>

CGAL::Quadratic_program_from_mps<NT>

CGAL::Nonnegative_linear_program_from_iterators<A_it, B_it, R_it, FL_it, L_it, FU_it, U_it, D_it, C_it>

CGAL::Quadratic_program_from_mps<NT>

CGAL::Nonnegative_linear_program_from_iterators<A_it, B_it, R_it, C_it>

Requires:
The value types of all iterator types (nested iterator types, respectively, for A_iterator) must be convertible to some common IntegralDomain ET.
Has Models:
CGAL::Quadratic_program<NT>
See Also
QuadraticProgram
LinearProgram
NonnegativeQuadraticProgram

Types

typedef unspecified_type A_iterator
 A random access iterator type to go columnwise over the constraint matrix A. More...
 
typedef unspecified_type B_iterator
 A random access iterator type to go over the entries of the right-hand side b.
 
typedef unspecified_type R_iterator
 A random access iterator type to go over the relations . More...
 
typedef unspecified_type C_iterator
 A random access iterator type to go over the entries of the linear objective function vector c.
 

Operations

int get_n () const
 returns the number n of variables (number of columns of A) in lp.
 
int get_m () const
 returns the number m of constraints (number of rows of A) in lp.
 
A_iterator get_a () const
 returns an iterator over the columns of A. More...
 
B_iterator get_b () const
 returns an iterator over the entries of b. More...
 
R_iterator get_r () const
 returns an iterator over the entries of . More...
 
C_iterator get_c () const
 returns an iterator over the entries of c. More...
 
std::iterator_traits
< C_iterator >::value_type 
get_c0 () const
 returns the constant term c0 of the objective function.
 

Member Typedef Documentation

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.

A random access iterator type to go over the relations .

The value type of R_iterator is CGAL::Comparison_result.

Member Function Documentation

A_iterator NonnegativeLinearProgram::get_a ( ) const

returns an iterator over the columns of A.

The corresponding past-the-end iterator is get_a()+get_n(). For j=0,,n1, *(get_a()+j) a random access iterator for column j.

B_iterator NonnegativeLinearProgram::get_b ( ) const

returns an iterator over the entries of b.

The corresponding past-the-end iterator is get_b()+get_m().

C_iterator NonnegativeLinearProgram::get_c ( ) const

returns an iterator over the entries of c.

The corresponding past-the-end iterator is get_c()+get_n().

R_iterator NonnegativeLinearProgram::get_r ( ) const

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 .