Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

BCP_cut_set Class Reference

#include <BCP_cut.hpp>

Inheritance diagram for BCP_cut_set:

BCP_vec< BCP_cut * > List of all members.

Public Member Functions

Constructor and destructor
 BCP_cut_set ()
 ~BCP_cut_set ()
Modifying methods
void append (const BCP_vec< BCP_cut * > &x)
void append (BCP_cut_set::const_iterator first, BCP_cut_set::const_iterator last)
void set_lb_ub (const BCP_vec< int > &pos, BCP_vec< double >::const_iterator bounds)
void set_lb_ub_st (const BCP_vec< BCP_obj_change > &cc)
void set_lb_ub_st (BCP_vec< int >::const_iterator pos, const BCP_vec< BCP_obj_change > &cc)
Methods related to deleting cuts from the cut set
void move_deletable_to_pool (const BCP_vec< int > &deletable_cuts, BCP_vec< BCP_cut * > &pool)

Private Member Functions

Disabled methods
 BCP_cut_set (const BCP_cut_set &)
BCP_cut_setoperator= (const BCP_cut_set &)

Detailed Description

This class is just a collection of pointers to cuts with a number of methods to manipulate these cuts and/or select certain entries.

Definition at line 323 of file BCP_cut.hpp.


Constructor & Destructor Documentation

BCP_cut_set::BCP_cut_set const BCP_cut_set  )  [private]
 

The copy constructor is declared but not defined to disable it.

BCP_cut_set::BCP_cut_set  )  [inline]
 

The default constructor creates a cut set with no cuts in it.

Definition at line 337 of file BCP_cut.hpp.

00337 {}

BCP_cut_set::~BCP_cut_set  )  [inline]
 

The destructor empties the cut set. NOTE: the destructor does NOT delete the cuts the members of the cut set point to.

Definition at line 340 of file BCP_cut.hpp.

00340 {}


Member Function Documentation

void BCP_cut_set::append BCP_cut_set::const_iterator  first,
BCP_cut_set::const_iterator  last
[inline]
 

Append the cuts in [first, last) to the end of the cut set.

Definition at line 353 of file BCP_cut.hpp.

References BCP_vec< T >::append().

00354                                                      {
00355       BCP_vec<BCP_cut*>::append(first, last);
00356    }

void BCP_cut_set::append const BCP_vec< BCP_cut * > &  x  )  [inline]
 

Append the cuts in the vector x to the end of the cut set.

Reimplemented from BCP_vec< BCP_cut * >.

Definition at line 348 of file BCP_cut.hpp.

References BCP_vec< T >::append().

00348                                                   {
00349       BCP_vec<BCP_cut*>::append(x);
00350    }

void BCP_cut_set::move_deletable_to_pool const BCP_vec< int > &  deletable_cuts,
BCP_vec< BCP_cut * > &  pool
 

Move the cut pointers whose indices are listed in deletable_cuts into the pool. Note that this method does NOT compress the cut set, it merely replaces the cut pointers with 0 pointers.

Definition at line 118 of file BCP_cut.cpp.

References BCP_vec< T >::begin(), BCP_vec< T >::end(), BCP_vec< BCP_cut * >::operator[](), BCP_vec< T >::reserve(), BCP_vec< T >::size(), and BCP_vec< T >::unchecked_push_back().

00120 {
00121    BCP_vec<int>::const_iterator ii = del_cuts.begin();
00122    BCP_vec<int>::const_iterator lastii = del_cuts.end();
00123    pool.reserve(pool.size() + del_cuts.size());
00124    while (ii != lastii) {
00125       pool.unchecked_push_back(operator[](*ii));
00126       operator[](*ii) = 0;
00127       ++ii;
00128    }
00129 }

BCP_cut_set& BCP_cut_set::operator= const BCP_cut_set  )  [private]
 

The assignment operator is declared but not defined to disable it.

void BCP_cut_set::set_lb_ub const BCP_vec< int > &  pos,
BCP_vec< double >::const_iterator  bounds
 

Set the lower/upper bound pairs of the entries given by the contents of pos to the values in [bounds, bounds + pos. size()).

Definition at line 12 of file BCP_cut.cpp.

References BCP_vec< T >::begin(), BCP_vec< T >::end(), and BCP_vec< BCP_cut * >::operator[]().

00014 {
00015    BCP_vec<int>::const_iterator ii = indices.begin();
00016    BCP_vec<int>::const_iterator lastii = indices.end();
00017    for ( ; ii != lastii; ++ii){
00018       const double lb = *bounds;
00019       ++bounds;
00020       const double ub = *bounds;
00021       ++bounds;
00022       operator[](*ii)->change_bounds(lb, ub);
00023    }
00024 }

void BCP_cut_set::set_lb_ub_st BCP_vec< int >::const_iterator  pos,
const BCP_vec< BCP_obj_change > &  cc
 

Set the lower/upper bound pairs and the stati of the entries given by the content of [pos, pos + cc. size()) to the triplets contained in cc.

Definition at line 44 of file BCP_cut.cpp.

References BCP_vec< T >::begin(), BCP_vec< T >::end(), and BCP_vec< BCP_cut * >::operator[]().

00046 {
00047    BCP_vec<BCP_obj_change>::const_iterator chi = vc.begin();
00048    BCP_vec<BCP_obj_change>::const_iterator lastchi = vc.end();
00049    while (chi != lastchi){
00050       operator[](*pos)->change_lb_ub_st(*chi);
00051       ++pos;
00052       ++chi;
00053    }
00054 }

void BCP_cut_set::set_lb_ub_st const BCP_vec< BCP_obj_change > &  cc  ) 
 

Set the lower/upper bound pairs and the stati of the first cc. size() entries to the triplets given in the vector. This method is invoked when the cut set is all the cuts in the current formulation and we want to change the triplets for the core cuts, which are at the beginning of that cut set.

Definition at line 29 of file BCP_cut.cpp.

References BCP_vec< BCP_cut * >::begin(), BCP_vec< T >::begin(), and BCP_vec< T >::end().

00030 {
00031    BCP_vec<BCP_obj_change>::const_iterator chi = vc.begin();
00032    BCP_vec<BCP_obj_change>::const_iterator lastchi = vc.end();
00033    iterator cut = begin();
00034    while (chi != lastchi) {
00035       (*cut)->change_lb_ub_st(*chi);
00036       ++cut;
00037       ++chi;
00038    }
00039 }


The documentation for this class was generated from the following files:
Generated on Wed Dec 3 14:32:37 2003 for BCP by doxygen 1.3.5