Implements the branching by adding a constraint to the set of active constraints. More...
#include <ogdf/lib/abacus/conbranchrule.h>
Public Member Functions | |
ConBranchRule (Master *master, PoolSlot< Constraint, Variable > *poolSlot) | |
Creates a branching constraint. | |
virtual | ~ConBranchRule () |
Constraint * | constraint () |
Returns a pointer to the branching constraint, or a 0-pointer if this constraint is not available. | |
const Constraint * | constraint () const |
Returns a const pointer to the branching constraint, or a 0-pointer if this constraint is not available. | |
virtual void | extract (LpSub *lp) override |
Overloaded to modify directly the linear programming relaxation. | |
virtual int | extract (Sub *sub) override |
Adds the branching constraint to the subproblem. | |
virtual void | initialize (Sub *sub) override |
Initializes the subproblem associated with the branching constraint. | |
virtual void | unExtract (LpSub *lp) override |
Should undo the modifictions of the linear programming relaxtion |lp|. | |
Public Member Functions inherited from abacus::BranchRule | |
BranchRule (Master *master) | |
Initializes a branching rule. | |
virtual | ~BranchRule () |
virtual bool | branchOnSetVar () |
Should indicate if the branching is performed by setting a binary variable. | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. | |
Private Member Functions | |
const ConBranchRule & | operator= (const ConBranchRule &rhs) |
Private Attributes | |
PoolSlotRef< Constraint, Variable > | poolSlotRef_ |
A reference to the pool slot of the branching constraints. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const ConBranchRule &rhs) |
Output operator for branching constraints. | |
Additional Inherited Members | |
Static Public Member Functions inherited from abacus::AbacusRoot | |
static bool | ascii2bool (const string &str) |
Converts the string str to a boolean value. | |
static bool | endsWith (const string &str, const string &end) |
Returns true if str ends with end, false otherwise. | |
static double | fracPart (double x) |
Returns the absolute value of the fractional part of x. | |
static const char * | onOff (bool value) |
Converts a boolean variable to the strings "on" and "off". | |
Protected Attributes inherited from abacus::BranchRule | |
Master * | master_ |
A pointer to the corresponding master of the optimization. | |
Implements the branching by adding a constraint to the set of active constraints.
Definition at line 44 of file conbranchrule.h.
|
inline |
Creates a branching constraint.
master | A pointer to the corresponding master of the optimization. |
poolSlot | A pointer to the pool slot of the branching constraint. |
Definition at line 57 of file conbranchrule.h.
|
inlinevirtual |
Definition at line 61 of file conbranchrule.h.
|
inline |
Returns a pointer to the branching constraint, or a 0-pointer if this constraint is not available.
Definition at line 102 of file conbranchrule.h.
|
inline |
Returns a const pointer to the branching constraint, or a 0-pointer if this constraint is not available.
Definition at line 107 of file conbranchrule.h.
Overloaded to modify directly the linear programming relaxation.
This required to evaluate the quality of a branching rule.
Reimplemented from abacus::BranchRule.
Adds the branching constraint to the subproblem.
Instead of adding it directly to the set of active constraints it is added to the cut buffer.
sub | The subproblem being modified. |
Implements abacus::BranchRule.
Initializes the subproblem associated with the branching constraint.
sub | A pointer to the subproblem that is associated with the branching constraint. |
Reimplemented from abacus::BranchRule.
|
private |
Should undo the modifictions of the linear programming relaxtion |lp|.
This function has to be redefined in a derived class if extract(LpSub*) is redefined there.
lp | A pointer to a the linear programming relaxtion of a subproblem. |
Reimplemented from abacus::BranchRule.
|
friend |
Output operator for branching constraints.
out | The output stream. |
rhs | The branch rule being output. |
|
private |
A reference to the pool slot of the branching constraints.
Definition at line 113 of file conbranchrule.h.