Implements a branching rule for modifying the lower and the upper bound of a variable. More...
#include <ogdf/lib/abacus/boundbranchrule.h>
Inheritance diagram for abacus::BoundBranchRule:Public Member Functions | |
| BoundBranchRule (Master *master, int variable, double lBound, double uBound) | |
| Creates a bound branch rule for given branching variable, lower bound lBound and upper bound uBound. | |
| virtual | ~BoundBranchRule () |
| virtual void | extract (LpSub *lp) |
| Pverloaded to modify directly the linear programming relaxation. | |
| virtual int | extract (Sub *sub) |
| Modifies a subproblem by changing the lower and the upper bound of the branching variable. | |
| double | lBound () const |
| Returns the lower bound of the branching variable. | |
| double | uBound () const |
| Returns the upper bound of the branching variable. | |
| virtual void | unExtract (LpSub *lp) |
| Should undo the modifictions of the linear programming relaxtion |lp|. | |
| int | variable () const |
| Returns the number of the branching variable. | |
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. | |
| virtual void | initialize (Sub *sub) |
| Called from the constructor of a subproblem. | |
Public Member Functions inherited from abacus::AbacusRoot | |
| virtual | ~AbacusRoot () |
| The destructor. | |
Private Attributes | |
| double | lBound_ |
| The lower bound of the branching variable. | |
| double | oldLpLBound_ |
| double | oldLpUBound_ |
| double | uBound_ |
| The upper bound of the branching variable. | |
| int | variable_ |
| The branching variable. | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const BoundBranchRule &rhs) |
| Output operator for bound branch rules. | |
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 a branching rule for modifying the lower and the upper bound of a variable.
Definition at line 40 of file boundbranchrule.h.
|
inline |
Creates a bound branch rule for given branching variable, lower bound lBound and upper bound uBound.
| master | A pointer to the corresponding master of the optimization. |
| variable | The branching variable. |
| lBound | The lower bound of the branching variable. |
| uBound | The upper bound of the branching variable. |
Definition at line 50 of file boundbranchrule.h.
|
inlinevirtual |
Definition at line 58 of file boundbranchrule.h.
Pverloaded to modify directly the linear programming relaxation.
This required to evaluate the quality of a branching rule.
Reimplemented from abacus::BranchRule.
Definition at line 94 of file boundbranchrule.h.
Modifies a subproblem by changing the lower and the upper bound of the branching variable.
| sub | The subproblem being modified. |
Implements abacus::BranchRule.
Definition at line 79 of file boundbranchrule.h.
|
inline |
Returns the lower bound of the branching variable.
Definition at line 115 of file boundbranchrule.h.
|
inline |
Returns the upper bound of the branching variable.
Definition at line 120 of file boundbranchrule.h.
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.
Definition at line 103 of file boundbranchrule.h.
|
inline |
Returns the number of the branching variable.
Definition at line 110 of file boundbranchrule.h.
|
friend |
Output operator for bound branch rules.
Writes the branching variable together with its lower and upper bound to an output stream.
| out | The output stream. |
| rhs | The branch rule being output. |
Definition at line 133 of file boundbranchrule.h.
|
private |
The lower bound of the branching variable.
Definition at line 126 of file boundbranchrule.h.
|
private |
Definition at line 128 of file boundbranchrule.h.
|
private |
Definition at line 129 of file boundbranchrule.h.
|
private |
The upper bound of the branching variable.
Definition at line 127 of file boundbranchrule.h.
|
private |
The branching variable.
Definition at line 125 of file boundbranchrule.h.