BCP_lp_relax Class Reference

An object of type BCP_lp_relax holds the description of an lp relaxation. More...

#include <BCP_matrix.hpp>

Inheritance diagram for BCP_lp_relax:
Inheritance graph
[legend]
Collaboration diagram for BCP_lp_relax:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Query methods



size_t colnum () const
 The number of columns.
size_t rownum () const
 The number of rows.
const BCP_vec< double > & Objective () const
 A const reference to the vector of objective coefficients.
const BCP_vec< double > & ColLowerBound () const
 A const reference to the vector of lower bounds on the variables.
const BCP_vec< double > & ColUpperBound () const
 A const reference to the vector of upper bounds on the variables.
const BCP_vec< double > & RowLowerBound () const
 A const reference to the vector of lower bounds on the cuts.
const BCP_vec< double > & RowUpperBound () const
 A const reference to the vector of upper bounds on the cuts.
Methods modifying the whole LP relaxation.



BCP_lp_relaxoperator= (const BCP_lp_relax &mat)
 Copy the content of x into the LP relaxation.
void reserve (const int MaxColNum, const int MaxRowNum, const int MaxNonzeros)
 Reserve space in the LP relaxation for at least MaxColNum columns, MaxRowNum rows and MaxNonzeros nonzero entries.
void clear ()
 Clear the LP relaxation.
void copyOf (const CoinPackedMatrix &m, const double *OBJ, const double *CLB, const double *CUB, const double *RLB, const double *RUB)
 Set up the LP relaxation by making a copy of the arguments.
void assign (CoinPackedMatrix &m, double *&OBJ, double *&CLB, double *&CUB, double *&RLB, double *&RUB)
 Set up the LP relaxation by taking over the pointers in the arguments.
Methods for expanding/shrinking the LP relaxation.



void erase_col_set (const BCP_vec< int > &pos)
 Remove the columns whose indices are listed in pos from the LP relaxation.
void erase_row_set (const BCP_vec< int > &pos)
 Remove the rows whose indices are listed in pos from the LP relaxation.
Packing/unpacking



void pack (BCP_buffer &buf) const
 Pack the LP relaxation into the buffer.
void unpack (BCP_buffer &buf)
 Unpack the LP relaxation from the buffer.
Constructors and destructor



 BCP_lp_relax (const bool colordered=true)
 Create an empty LP relaxation with given ordering.
 BCP_lp_relax (const BCP_lp_relax &mat)
 The copy constructor makes a copy of the argument LP relaxation.
 BCP_lp_relax (BCP_vec< BCP_row * > &rows, BCP_vec< double > &CLB, BCP_vec< double > &CUB, BCP_vec< double > &OBJ)
 Create a row major ordered LP relaxation by assigning the content of the arguments to the LP relaxation.
 BCP_lp_relax (BCP_vec< BCP_row * > &rows, BCP_vec< double > &CLB, BCP_vec< double > &CUB, BCP_vec< double > &OBJ, double extra_gap, double extra_major)
 Same as the previous method except that this method allows extra_gap and extra_major to be specified.
 BCP_lp_relax (BCP_vec< BCP_col * > &cols, BCP_vec< double > &RLB, BCP_vec< double > &RUB)
 Create a column major ordered LP relaxation by assigning the content of the arguments to the LP relaxation.
 BCP_lp_relax (BCP_vec< BCP_col * > &cols, BCP_vec< double > &RLB, BCP_vec< double > &RUB, double extra_gap, double extra_major)
 Same as the previous method except that this method allows extra_gap and extra_major to be specified.
 BCP_lp_relax (const bool colordered, const BCP_vec< int > &VB, const BCP_vec< int > &EI, const BCP_vec< double > &EV, const BCP_vec< double > &OBJ, const BCP_vec< double > &CLB, const BCP_vec< double > &CUB, const BCP_vec< double > &RLB, const BCP_vec< double > &RUB)
 Create an LP relaxation of the given ordering by copying the content of the arguments to the LP relaxation.
 BCP_lp_relax (const bool colordered, const int rownum, const int colnum, const int nznum, int *&VB, int *&EI, double *&EV, double *&OBJ, double *&CLB, double *&CUB, double *&RLB, double *&RUB)
 Create an LP relaxation of the given ordering by assigning the content of the arguments to the LP relaxation.
 ~BCP_lp_relax ()
 The destructor deletes the data members.

Private Member Functions

helper functions for the constructors



void BCP_createColumnOrderedMatrix (BCP_vec< BCP_row * > &rows, BCP_vec< double > &CLB, BCP_vec< double > &CUB, BCP_vec< double > &OBJ)
void BCP_createRowOrderedMatrix (BCP_vec< BCP_col * > &cols, BCP_vec< double > &RLB, BCP_vec< double > &RUB)

Private Attributes

Data members



BCP_vec< double > _Objective
 The objective coefficients of the variables.
BCP_vec< double > _ColLowerBound
 The lower bounds on the variables.
BCP_vec< double > _ColUpperBound
 The upper bounds on the variables.
BCP_vec< double > _RowLowerBound
 The lower bounds on the cuts.
BCP_vec< double > _RowUpperBound
 The upper bounds on the cuts.

Detailed Description

An object of type BCP_lp_relax holds the description of an lp relaxation.

The matrix, lower/upper bounds on the variables and cuts and objective coefficients for the variables.

Definition at line 267 of file BCP_matrix.hpp.


Constructor & Destructor Documentation

BCP_lp_relax::BCP_lp_relax ( const bool  colordered = true  )  [inline]

Create an empty LP relaxation with given ordering.

Definition at line 377 of file BCP_matrix.hpp.

BCP_lp_relax::BCP_lp_relax ( const BCP_lp_relax mat  ) 

The copy constructor makes a copy of the argument LP relaxation.

BCP_lp_relax::BCP_lp_relax ( BCP_vec< BCP_row * > &  rows,
BCP_vec< double > &  CLB,
BCP_vec< double > &  CUB,
BCP_vec< double > &  OBJ 
)

Create a row major ordered LP relaxation by assigning the content of the arguments to the LP relaxation.

When the constructor returns the content of 'rows' doesn't change while that of CLB, CUB and OBJ will be whatever the default constructor for those arguments create.

BCP_lp_relax::BCP_lp_relax ( BCP_vec< BCP_row * > &  rows,
BCP_vec< double > &  CLB,
BCP_vec< double > &  CUB,
BCP_vec< double > &  OBJ,
double  extra_gap,
double  extra_major 
)

Same as the previous method except that this method allows extra_gap and extra_major to be specified.

For the description of those see the documentation of CoinPackedMatrix. (extra_gap will be used for adding columns, while extra major for adding rows)

BCP_lp_relax::BCP_lp_relax ( BCP_vec< BCP_col * > &  cols,
BCP_vec< double > &  RLB,
BCP_vec< double > &  RUB 
)

Create a column major ordered LP relaxation by assigning the content of the arguments to the LP relaxation.

When the constructor returns the content of 'cols' doesn't change while that of RLB and RUB will be whatever the default constructor for those arguments create.

BCP_lp_relax::BCP_lp_relax ( BCP_vec< BCP_col * > &  cols,
BCP_vec< double > &  RLB,
BCP_vec< double > &  RUB,
double  extra_gap,
double  extra_major 
)

Same as the previous method except that this method allows extra_gap and extra_major to be specified.

For the description of those see the documentation of CoinPackedMatrix. (extra_gap will be used for adding rows, while extra major for adding columns)

BCP_lp_relax::BCP_lp_relax ( const bool  colordered,
const BCP_vec< int > &  VB,
const BCP_vec< int > &  EI,
const BCP_vec< double > &  EV,
const BCP_vec< double > &  OBJ,
const BCP_vec< double > &  CLB,
const BCP_vec< double > &  CUB,
const BCP_vec< double > &  RLB,
const BCP_vec< double > &  RUB 
)

Create an LP relaxation of the given ordering by copying the content of the arguments to the LP relaxation.

BCP_lp_relax::BCP_lp_relax ( const bool  colordered,
const int  rownum,
const int  colnum,
const int  nznum,
int *&  VB,
int *&  EI,
double *&  EV,
double *&  OBJ,
double *&  CLB,
double *&  CUB,
double *&  RLB,
double *&  RUB 
)

Create an LP relaxation of the given ordering by assigning the content of the arguments to the LP relaxation.

When the constructor returns the content of the arguments will be NULL pointers.

BCP_lp_relax::~BCP_lp_relax (  )  [inline]

The destructor deletes the data members.

Definition at line 435 of file BCP_matrix.hpp.


Member Function Documentation

size_t BCP_lp_relax::colnum (  )  const [inline]

The number of columns.

Definition at line 288 of file BCP_matrix.hpp.

size_t BCP_lp_relax::rownum (  )  const [inline]

The number of rows.

Definition at line 290 of file BCP_matrix.hpp.

const BCP_vec<double>& BCP_lp_relax::Objective (  )  const [inline]

A const reference to the vector of objective coefficients.

Definition at line 292 of file BCP_matrix.hpp.

const BCP_vec<double>& BCP_lp_relax::ColLowerBound (  )  const [inline]

A const reference to the vector of lower bounds on the variables.

Definition at line 294 of file BCP_matrix.hpp.

const BCP_vec<double>& BCP_lp_relax::ColUpperBound (  )  const [inline]

A const reference to the vector of upper bounds on the variables.

Definition at line 296 of file BCP_matrix.hpp.

const BCP_vec<double>& BCP_lp_relax::RowLowerBound (  )  const [inline]

A const reference to the vector of lower bounds on the cuts.

Definition at line 298 of file BCP_matrix.hpp.

const BCP_vec<double>& BCP_lp_relax::RowUpperBound (  )  const [inline]

A const reference to the vector of upper bounds on the cuts.

Definition at line 300 of file BCP_matrix.hpp.

BCP_lp_relax& BCP_lp_relax::operator= ( const BCP_lp_relax mat  ) 

Copy the content of x into the LP relaxation.

Reimplemented from CoinPackedMatrix.

void BCP_lp_relax::reserve ( const int  MaxColNum,
const int  MaxRowNum,
const int  MaxNonzeros 
)

Reserve space in the LP relaxation for at least MaxColNum columns, MaxRowNum rows and MaxNonzeros nonzero entries.

This is useful when columns/rows are added to the LP relaxation in small chunks and to avoid a series of reallocation we reserve sufficient space up front.

void BCP_lp_relax::clear (  ) 

Clear the LP relaxation.

Reimplemented from CoinPackedMatrix.

void BCP_lp_relax::copyOf ( const CoinPackedMatrix m,
const double *  OBJ,
const double *  CLB,
const double *  CUB,
const double *  RLB,
const double *  RUB 
)

Set up the LP relaxation by making a copy of the arguments.

void BCP_lp_relax::assign ( CoinPackedMatrix m,
double *&  OBJ,
double *&  CLB,
double *&  CUB,
double *&  RLB,
double *&  RUB 
)

Set up the LP relaxation by taking over the pointers in the arguments.

void BCP_lp_relax::erase_col_set ( const BCP_vec< int > &  pos  ) 

Remove the columns whose indices are listed in pos from the LP relaxation.

void BCP_lp_relax::erase_row_set ( const BCP_vec< int > &  pos  ) 

Remove the rows whose indices are listed in pos from the LP relaxation.

void BCP_lp_relax::pack ( BCP_buffer buf  )  const

Pack the LP relaxation into the buffer.

void BCP_lp_relax::unpack ( BCP_buffer buf  ) 

Unpack the LP relaxation from the buffer.

void BCP_lp_relax::BCP_createColumnOrderedMatrix ( BCP_vec< BCP_row * > &  rows,
BCP_vec< double > &  CLB,
BCP_vec< double > &  CUB,
BCP_vec< double > &  OBJ 
) [private]
void BCP_lp_relax::BCP_createRowOrderedMatrix ( BCP_vec< BCP_col * > &  cols,
BCP_vec< double > &  RLB,
BCP_vec< double > &  RUB 
) [private]

Member Data Documentation

BCP_vec<double> BCP_lp_relax::_Objective [private]

The objective coefficients of the variables.

Definition at line 272 of file BCP_matrix.hpp.

The lower bounds on the variables.

Definition at line 274 of file BCP_matrix.hpp.

The upper bounds on the variables.

Definition at line 276 of file BCP_matrix.hpp.

The lower bounds on the cuts.

Definition at line 278 of file BCP_matrix.hpp.

The upper bounds on the cuts.

Definition at line 280 of file BCP_matrix.hpp.


The documentation for this class was generated from the following file:

Generated on 15 Mar 2015 for Coin-All by  doxygen 1.6.1