Bcp 1.4.4
Loading...
Searching...
No Matches
List of all members
BCP_internal_brobj Class Reference

This class is the internal representation of a branching object. More...

#include <BCP_branch.hpp>

Public Member Functions

Constructors and destructor
 BCP_internal_brobj ()
 The default constructor creates an empty internal branching object (which can be filled later by unpacking a buffer).
 
 BCP_internal_brobj (BCP_lp_branching_object &candidate)
 This constructor sets the number of children and copies the contents of the positions and bounds of the forced changes to the positions and bounds of the newly created internal branching object.
 
 ~BCP_internal_brobj ()
 The desctructor deletes all data members.
 
Query methods
int child_num () const
 Return the number of children.
 
int affected_varnum () const
 Return the number of affected variables.
 
int affected_cutnum () const
 Return the number of affected cuts.
 
const BCP_vec< int > & var_positions () const
 Return a const reference to the vector of positions of variables affected by the branching.
 
const BCP_vec< int > & cut_positions () const
 Return a const reference to the vector of positions of cuts affected by the branching.
 
BCP_vec< double >::const_iterator var_bounds_child (const int index) const
 Return a const iterator within _var_bounds to the location where the bound pairs for the index-th child start.
 
BCP_vec< double >::const_iterator cut_bounds_child (const int index) const
 Return a const iterator within _cut_bounds to the location where the bound pairs for the index-th child start.
 
Interaction with the LP solver
void apply_child_bounds (OsiSolverInterface *lp, int child_ind) const
 Modify the bounds in the LP solver by applying the changes specified for the child_ind-th child.
 
Packing and unpacking
void pack (BCP_buffer &buf) const
 Pack the internal branching object into the buffer.
 
void unpack (BCP_buffer &buf)
 Unpack an internal branching object from the buffer.
 

Detailed Description

This class is the internal representation of a branching object.

We document it only for the sake of completness, the user need not worry about it.

An internal branching object is created AFTER all the cuts/variables the branching object wanted to add the relaxation are already added, thus only the bound changes on affected variables are specified.

NOTE: There are only two ways to set up an internal branching object. One is through a constructor that passes on the data members, the second is to set it up with the default constructor then unpack its content from a buffer.

Definition at line 31 of file BCP_branch.hpp.

Constructor & Destructor Documentation

◆ BCP_internal_brobj() [1/2]

BCP_internal_brobj::BCP_internal_brobj ( )
inline

The default constructor creates an empty internal branching object (which can be filled later by unpacking a buffer).

Definition at line 66 of file BCP_branch.hpp.

◆ BCP_internal_brobj() [2/2]

BCP_internal_brobj::BCP_internal_brobj ( BCP_lp_branching_object & candidate)

This constructor sets the number of children and copies the contents of the positions and bounds of the forced changes to the positions and bounds of the newly created internal branching object.

◆ ~BCP_internal_brobj()

BCP_internal_brobj::~BCP_internal_brobj ( )
inline

The desctructor deletes all data members.

Definition at line 73 of file BCP_branch.hpp.

Member Function Documentation

◆ child_num()

int BCP_internal_brobj::child_num ( ) const
inline

Return the number of children.

Definition at line 79 of file BCP_branch.hpp.

◆ affected_varnum()

int BCP_internal_brobj::affected_varnum ( ) const
inline

Return the number of affected variables.

Definition at line 81 of file BCP_branch.hpp.

◆ affected_cutnum()

int BCP_internal_brobj::affected_cutnum ( ) const
inline

Return the number of affected cuts.

Definition at line 83 of file BCP_branch.hpp.

◆ var_positions()

const BCP_vec< int > & BCP_internal_brobj::var_positions ( ) const
inline

Return a const reference to the vector of positions of variables affected by the branching.

Definition at line 87 of file BCP_branch.hpp.

◆ cut_positions()

const BCP_vec< int > & BCP_internal_brobj::cut_positions ( ) const
inline

Return a const reference to the vector of positions of cuts affected by the branching.

Definition at line 90 of file BCP_branch.hpp.

◆ var_bounds_child()

BCP_vec< double >::const_iterator BCP_internal_brobj::var_bounds_child ( const int index) const
inline

Return a const iterator within _var_bounds to the location where the bound pairs for the index-th child start.

Definition at line 96 of file BCP_branch.hpp.

◆ cut_bounds_child()

BCP_vec< double >::const_iterator BCP_internal_brobj::cut_bounds_child ( const int index) const
inline

Return a const iterator within _cut_bounds to the location where the bound pairs for the index-th child start.

Definition at line 103 of file BCP_branch.hpp.

◆ apply_child_bounds()

void BCP_internal_brobj::apply_child_bounds ( OsiSolverInterface * lp,
int child_ind ) const

Modify the bounds in the LP solver by applying the changes specified for the child_ind-th child.

◆ pack()

void BCP_internal_brobj::pack ( BCP_buffer & buf) const

Pack the internal branching object into the buffer.

◆ unpack()

void BCP_internal_brobj::unpack ( BCP_buffer & buf)

Unpack an internal branching object from the buffer.


The documentation for this class was generated from the following file: