|
Minotaur 0.4.1
Docs for developers
|
Base class for describing candidates for branching on a node in branch-and-bound. More...
#include <BrCand.h>


Public Member Functions | |
| BrCand () | |
| Constructor. | |
| virtual | ~BrCand () |
| Destroy. | |
| virtual void | decrBranches () |
| Decrement the number of branches currently associated with this candidate. | |
| virtual double | getDDist ()=0 |
| virtual BranchDirection | getDir () const |
| Get the preferred direction. | |
| virtual HandlerPtr | getHandler () |
| Return the handler that created this candidate. | |
| virtual std::string | getName () const |
| Display for debugging. | |
| virtual int | getPCostIndex () const |
| Return the index in the pseudo cost array. If it is not in the array, return a value less than 0. | |
| virtual double | getScore () |
| Return the score for this candidate. | |
| virtual double | getUDist ()=0 |
| virtual int | numBranches () |
| Return the number of branches currently associated with this candidate. | |
| virtual void | setDir (BranchDirection d) |
| Set the preferred direction that will be processed first in the branch-and-bound tree. | |
| void | setDist (double ddist, double udist) |
| Set the distance of the current solution from the down branch and the up branch. | |
| virtual void | setHandler (HandlerPtr h) |
| Set the handler that created this candidate. | |
| virtual void | setNumBranches (int n) |
| Set the number of branches associated with this candidate. | |
| virtual void | setScore (const double score) |
| Set score for this candidate. | |
Protected Attributes | |
| HandlerPtr | h_ |
| Handler that created this candidate. | |
| int | branches_ |
| Number of branches still in the tree which were created by this candidate. | |
| int | pCostIndex_ |
| Index of the this candidate in the pseudo-cost array. | |
| BranchDirection | prefDir_ |
| Which is preferred for processing next? UpBranch or DownBranch? | |
| double | score_ |
| Score of this candidate. | |
Base class for describing candidates for branching on a node in branch-and-bound.
A BranchCand object is something that can be branched upon. This class is abstract. Examples are BrVarCand, BrSOS1Cand, BrSOS2Cand, BrHyperCand, BrGenCand etc.
|
pure virtual |
Return the distance of the current point from the branching constraint: down direction. For an integer constrained variable, x, it would be 
Implemented in Minotaur::BrVarCand, and Minotaur::SOSBrCand.
|
inlinevirtual |
Display for debugging.
Reimplemented in Minotaur::BrVarCand, and Minotaur::SOSBrCand.
|
pure virtual |
Return the distance of the current point from the branching constraint: up direction For an integer constrained variable, x, it would be 
Implemented in Minotaur::BrVarCand, and Minotaur::SOSBrCand.
|
inlinevirtual |
Set score for this candidate.
The score is used to compare two candidates.
| [in] | score | The desired score of this candidate. |