#include <BCP_problem_core.hpp>
Collaboration diagram for BCP_problem_core:
Public Member Functions | |
Constructors and destructor | |
BCP_problem_core () | |
The default constructor creates an empty core description: no variables/cuts and an empty matrix. | |
BCP_problem_core (BCP_vec< BCP_var_core * > &v, BCP_vec< BCP_cut_core * > &c, BCP_lp_relax *&m) | |
This constructor "takes over" the arguments. | |
~BCP_problem_core () | |
The desctructor deletes all data members. | |
Query methods | |
size_t | varnum () const |
Return the number of variables in the core. | |
size_t | cutnum () const |
Return the number of cuts in the core. | |
Packing and unpacking methods | |
void | pack (BCP_buffer &buf) const |
Pack the contents of the core description into the buffer. | |
void | unpack (BCP_buffer &buf) |
Unpack the contents of the core description from the buffer. | |
Public Attributes | |
Data members | |
BCP_vec< BCP_var_core * > | vars |
A vector of pointers to the variables in the core of the problem. | |
BCP_vec< BCP_cut_core * > | cuts |
A vector of pointers to the cuts in the core of the problem. | |
BCP_lp_relax * | matrix |
A pointer to the constraint matrix corresponding to the core variables and cuts. | |
Private Member Functions | |
Private and disabled methods | |
void | clear () |
Delete all data members. | |
BCP_problem_core (const BCP_problem_core &) | |
The copy constructor is declared but not defined to disable it. | |
BCP_problem_core & | operator= (const BCP_problem_core &) |
The assignment operator is declared but not defined to disable it. |
Core cuts and variables never leave the formulation.
Definition at line 31 of file BCP_problem_core.hpp.
BCP_problem_core::BCP_problem_core | ( | const BCP_problem_core & | ) | [private] |
The copy constructor is declared but not defined to disable it.
BCP_problem_core::BCP_problem_core | ( | ) |
The default constructor creates an empty core description: no variables/cuts and an empty matrix.
Definition at line 22 of file BCP_problem_core.cpp.
BCP_problem_core::BCP_problem_core | ( | BCP_vec< BCP_var_core * > & | v, | |
BCP_vec< BCP_cut_core * > & | c, | |||
BCP_lp_relax *& | m | |||
) | [inline] |
This constructor "takes over" the arguments.
The created core description will have the content of the arguments in its data members while the arguments lose their content.
Definition at line 65 of file BCP_problem_core.hpp.
References c, cuts, m, BCP_vec< T >::swap(), and vars.
BCP_problem_core::~BCP_problem_core | ( | ) |
The desctructor deletes all data members.
Definition at line 25 of file BCP_problem_core.cpp.
References clear().
void BCP_problem_core::clear | ( | ) | [inline, private] |
Delete all data members.
This method purges the pointer vector members, i.e., deletes the object the pointers in the vectors point to.
Definition at line 14 of file BCP_problem_core.cpp.
References cuts, matrix, purge_ptr_vector(), and vars.
Referenced by unpack(), and ~BCP_problem_core().
BCP_problem_core& BCP_problem_core::operator= | ( | const BCP_problem_core & | ) | [private] |
The assignment operator is declared but not defined to disable it.
size_t BCP_problem_core::varnum | ( | ) | const [inline] |
Return the number of variables in the core.
Definition at line 78 of file BCP_problem_core.hpp.
References BCP_vec< T >::size(), and vars.
Referenced by BCP_lp_clean_up_node(), BCP_lp_create_added_vars(), BCP_lp_make_parent_from_node(), BCP_lp_pack_core(), BCP_lp_pack_noncore_vars(), BCP_lp_set_core(), BCP_tm_create_child(), BCP_tm_unpack_node_description(), BCP_lp_user::load_problem(), BCP_problem_core_change::operator=(), and BCP_lp_user::select_vars_to_delete().
size_t BCP_problem_core::cutnum | ( | ) | const [inline] |
Return the number of cuts in the core.
Definition at line 80 of file BCP_problem_core.hpp.
References cuts, and BCP_vec< T >::size().
Referenced by BCP_lp_adjust_row_effectiveness(), BCP_lp_clean_up_node(), BCP_lp_create_added_cuts(), BCP_lp_make_parent_from_node(), BCP_lp_pack_core(), BCP_lp_pack_noncore_cuts(), BCP_lp_send_cuts_to_cp(), BCP_lp_set_core(), BCP_tm_create_child(), BCP_tm_unpack_node_description(), BCP_lp_user::load_problem(), BCP_problem_core_change::operator=(), and BCP_lp_user::select_cuts_to_delete().
void BCP_problem_core::pack | ( | BCP_buffer & | buf | ) | const |
Pack the contents of the core description into the buffer.
Definition at line 32 of file BCP_problem_core.cpp.
References BCP_cut::bcpind(), BCP_var::bcpind(), BCP_vec< T >::begin(), cuts, BCP_vec< T >::end(), BCP_cut::lb(), BCP_var::lb(), matrix, BCP_var::obj(), BCP_cut_core::obj_type(), BCP_var_core::obj_type(), BCP_lp_relax::pack(), BCP_buffer::pack(), BCP_vec< T >::size(), BCP_cut::status(), BCP_var::status(), BCP_cut::ub(), BCP_var::ub(), BCP_var::var_type(), and vars.
Referenced by BCP_tm_initialize_process_type(), and BCP_single_environment::register_process().
void BCP_problem_core::unpack | ( | BCP_buffer & | buf | ) |
Unpack the contents of the core description from the buffer.
Definition at line 72 of file BCP_problem_core.cpp.
References clear(), cuts, matrix, BCP_vec< T >::reserve(), BCP_cut::set_bcpind(), BCP_var::set_bcpind(), BCP_cut::set_status(), BCP_var::set_status(), BCP_vec< T >::unchecked_push_back(), BCP_lp_relax::unpack(), BCP_buffer::unpack(), and vars.
Referenced by BCP_cg_main(), BCP_lp_process_core(), BCP_tmstorage_main(), BCP_vg_main(), and BCP_single_environment::register_process().
A vector of pointers to the variables in the core of the problem.
These are the variables that always stay in the problem formulation.
Definition at line 48 of file BCP_problem_core.hpp.
Referenced by BCP_lp_process_core(), BCP_lp_unpack_active_node(), BCP_lp_unpack_parent(), BCP_problem_core(), clear(), BCP_problem_core_change::operator=(), pack(), unpack(), and varnum().
A vector of pointers to the cuts in the core of the problem.
These are the cuts that always stay in the problem formulation.
Definition at line 51 of file BCP_problem_core.hpp.
Referenced by BCP_lp_process_core(), BCP_lp_unpack_active_node(), BCP_lp_unpack_parent(), BCP_problem_core(), clear(), cutnum(), BCP_problem_core_change::operator=(), pack(), and unpack().
A pointer to the constraint matrix corresponding to the core variables and cuts.
Definition at line 54 of file BCP_problem_core.hpp.
Referenced by clear(), BCP_lp_user::load_problem(), pack(), and unpack().