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; }
49 static bool _rows_are_valid;
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);
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; }
111 static bool _cols_are_valid;
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.
The class BCP_vec serves the same purpose as the vector class in the standard template library.