17 for ( ; ii != lastii; ++ii){
18 const double lb = *bounds;
20 const double ub = *bounds;
34 while (chi != lastchi) {
35 (*cut)->change_lb_ub_st(*chi);
49 while (chi != lastchi){
59 BCP_cut_set::nonzero_slack(
int first_to_check,
const double * slacks,
60 const double etol,
const int ineff_limit,
63 const int cutnum =
size();
65 for ( ; first_to_check < cutnum; ++first_to_check) {
70 if (slacks[first_to_check] > etol) {
82 BCP_cut_set::zero_dual(
int first_to_check,
const double * duals,
83 const double etol,
const int ineff_limit,
86 const int cutnum =
size();
88 for ( ; first_to_check < cutnum; ++first_to_check) {
93 if (abs(duals[first_to_check]) <= etol) {
105 BCP_cut_set::deletable(
int bcutnum,
BCP_vec<int>& collection)
const
107 const int cutnum =
size();
108 collection.
reserve(cutnum - bcutnum);
110 for (i = bcutnum; i < cutnum; ++i) {
124 while (ii != lastii) {
virtual ~BCP_cut_algo()=0
The destructor deletes the object.
pos
position where the operator should be printed when printing the expression
Abstract base class that defines members common to all types of cuts.
reference operator[](const size_t i)
Return a reference to the i-th entry.
void 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.
void set_lb_ub_st(const BCP_vec< BCP_obj_change > &cc)
Set the lower/upper bound pairs and the stati of the first cc.
iterator begin()
Return an iterator to the beginning of the object.
void reserve(const size_t n)
Reallocate the object to make space for n entries.
int decrease_effective_count()
Decrease the effectiveness count by 1 (or to -1 if it was positive).
void change_lb_ub_st(const BCP_obj_change &change)
Set the lower/upper bounds and the status of the cut simultaneously to the values given in the data m...
int increase_effective_count()
Increase the effectiveness count by 1 (or to 1 if it was negative).
size_t size() const
Return the current number of entries.
iterator end()
Return an iterator to the end of the object.
void change_bounds(const double lb, const double ub)
Change just the lower/upper bounds.
void unchecked_push_back(const_reference x)
Append x to the end of the vector.
void 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...
bool is_to_be_removed() const
Return whether the cut must be removed from the formulation.