15class BCP_lp_waiting_row {
17 BCP_lp_waiting_row(
const BCP_lp_waiting_row&);
18 BCP_lp_waiting_row& operator=(
const BCP_lp_waiting_row&);
25 _cut(
cut), _row(
row), _violation(viol) {}
37 inline void delete_row() {
delete _row; _row = 0; _violation = -1;}
40 inline double violation()
const {
return _violation; }
47class BCP_lp_cut_pool :
public BCP_vec<BCP_lp_waiting_row*> {
49 static bool _rows_are_valid;
52 BCP_lp_cut_pool& operator=(
const BCP_lp_cut_pool&);
65 if (! _rows_are_valid)
67BCP_lp_cut_pool::compute_violations() : rows are not valid\n");
68 while (first != last) {
69 (*first)->compute_violation(lpres);
78class BCP_lp_waiting_col {
80 BCP_lp_waiting_col(
const BCP_lp_waiting_col&);
81 BCP_lp_waiting_col& operator=(
const BCP_lp_waiting_col&);
88 _var(
var), _col(
col), _red_cost(rc) {}
100 inline void delete_col() {
delete _col; _col = 0; _red_cost = 0; }
103 inline double red_cost()
const {
return _red_cost; }
109class BCP_lp_var_pool :
public BCP_vec<BCP_lp_waiting_col*> {
111 static bool _cols_are_valid;
114 BCP_lp_var_pool& operator=(
const BCP_lp_var_pool&);
127 if (! _cols_are_valid)
129BCP_lp_var_pool::compute_red_costs() : cols are not valid\n");
130 while (first != last) {
131 (*first)->compute_red_cost(lpres);
void purge_ptr_vector(BCP_vec< T * > &pvec, typename BCP_vec< T * >::iterator first, typename BCP_vec< T * >::iterator last)
This function purges the entries [first,last) from the vector of pointers pvec.
This class holds a column in a compressed form.
Abstract base class that defines members common to all types of cuts.
Currently there isn't any error handling in BCP.
int remove_nonviolated(const double etol)
void compute_violations(const BCP_lp_result &lpres, BCP_lp_cut_pool::iterator first, BCP_lp_cut_pool::iterator last)
void rows_are_valid(bool status)
bool rows_are_valid() const
This class holds the results after solving an LP relaxation.
int remove_positives(const double etol)
bool cols_are_valid() const
void cols_are_valid(bool status)
void compute_red_costs(const BCP_lp_result &lpres, BCP_lp_var_pool::iterator first, BCP_lp_var_pool::iterator last)
BCP_lp_waiting_col(BCP_var *var, BCP_col *col=0, double rc=0)
void set_col(BCP_col *&col)
const BCP_var * var() const
void compute_red_cost(const BCP_lp_result &lpres)
const BCP_col * col() const
void set_violation(double v)
void set_row(BCP_row *&row)
const BCP_cut * cut() const
const BCP_row * row() const
BCP_lp_waiting_row(BCP_cut *cut, BCP_row *row=0, double viol=-1)
void compute_violation(const BCP_lp_result &lpres)
This class holds a row in a compressed form.
Abstract base class that defines members common to all types of variables.
BCP_vec(const size_t n, const_reference value)
BCP_lp_waiting_row ** iterator