#include <BlisBranchObjectInt.h>
Inheritance diagram for BlisBranchObjectInt:
Public Member Functions | |
BlisBranchObjectInt () | |
Default constructor. | |
BlisBranchObjectInt (BlisModel *model, int varInd, int direction, double value) | |
Construct a branching object, which branching on variable varInd. | |
BlisBranchObjectInt (BlisModel *model, int varInd, int intScore, double dblScore, int direction, double value) | |
Construct a branching object, which branching on variable varInd. | |
BlisBranchObjectInt (BlisModel *model, int varInd, int direction, double lowerValue, double upperValue) | |
Create a degenerate branching object. | |
BlisBranchObjectInt (const BlisBranchObjectInt &) | |
Copy constructor. | |
BlisBranchObjectInt & | operator= (const BlisBranchObjectInt &rhs) |
Assignment operator. | |
virtual BcpsBranchObject * | clone () const |
Clone. | |
virtual | ~BlisBranchObjectInt () |
Destructor. | |
virtual double | branch (bool normalBranch=false) |
Set the bounds for the variable according to the current arm of the branch and advances the object state to the next arm. | |
virtual void | print (bool normalBranch) |
Print something about branch - only if log level high. | |
const double * | getDown () const |
Get down arm bounds. | |
const double * | getUp () const |
Get upper arm bounds. | |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) const |
Pack to an encoded object. | |
virtual AlpsReturnStatus | decode (AlpsEncoded &encoded) |
Unpack a branching object from an encoded object. | |
BlisBranchObjectInt () | |
Default constructor. | |
BlisBranchObjectInt (BlisModel *model, int varInd, int direction, double value) | |
Construct a branching object, which branching on variable varInd. | |
BlisBranchObjectInt (BlisModel *model, int varInd, int intScore, double dblScore, int direction, double value) | |
Construct a branching object, which branching on variable varInd. | |
BlisBranchObjectInt (BlisModel *model, int varInd, int direction, double lowerValue, double upperValue) | |
Create a degenerate branching object. | |
BlisBranchObjectInt (const BlisBranchObjectInt &) | |
Copy constructor. | |
BlisBranchObjectInt & | operator= (const BlisBranchObjectInt &rhs) |
Assignment operator. | |
virtual BcpsBranchObject * | clone () const |
Clone. | |
virtual | ~BlisBranchObjectInt () |
Destructor. | |
virtual double | branch (bool normalBranch=false) |
Set the bounds for the variable according to the current arm of the branch and advances the object state to the next arm. | |
virtual void | print (bool normalBranch) |
Print something about branch - only if log level high. | |
const double * | getDown () const |
Get down arm bounds. | |
const double * | getUp () const |
Get upper arm bounds. | |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) const |
Pack to an encoded object. | |
virtual AlpsReturnStatus | decode (AlpsEncoded &encoded) |
Unpack a branching object from an encoded object. | |
Protected Member Functions | |
AlpsReturnStatus | encodeBlis (AlpsEncoded *encoded) const |
Pack Blis portion to an encoded object. | |
AlpsReturnStatus | decodeBlis (AlpsEncoded &encoded) |
Unpack Blis portion from an encoded object. | |
AlpsReturnStatus | encodeBlis (AlpsEncoded *encoded) const |
Pack Blis portion to an encoded object. | |
AlpsReturnStatus | decodeBlis (AlpsEncoded &encoded) |
Unpack Blis portion from an encoded object. | |
Protected Attributes | |
double | down_ [2] |
Down_[0]: the lower bound of down arm; Down_[1]: the upper bound of down arm;. | |
double | up_ [2] |
Up_[0]: the lower bound of upper arm; Up_[1]: the upper bound of upper arm;. |
Definition at line 39 of file BlisBranchObjectInt.h.
BlisBranchObjectInt::BlisBranchObjectInt | ( | ) | [inline] |
Default constructor.
Definition at line 54 of file BlisBranchObjectInt.h.
References BLIS_BO_INT, down_, BcpsBranchObject::type_, and up_.
Referenced by clone().
BlisBranchObjectInt::BlisBranchObjectInt | ( | BlisModel * | model, | |
int | varInd, | |||
int | direction, | |||
double | value | |||
) | [inline] |
Construct a branching object, which branching on variable varInd.
varInd | the index of integer variable in object set | |
direction | the direction of first branching: 1(up), -1(down) | |
value | the fractional solution value of variable varInd |
Definition at line 70 of file BlisBranchObjectInt.h.
References BLIS_BO_INT, flopc::ceil(), down_, flopc::floor(), BcpsBranchObject::model(), BcpsBranchObject::objectIndex_, BcpsBranchObject::type_, up_, and BcpsBranchObject::value_.
BlisBranchObjectInt::BlisBranchObjectInt | ( | BlisModel * | model, | |
int | varInd, | |||
int | intScore, | |||
double | dblScore, | |||
int | direction, | |||
double | value | |||
) | [inline] |
Construct a branching object, which branching on variable varInd.
varInd | the index of integer variable in object set | |
intScore | the integer score/goodness | |
dblScore | the double score/goodness | |
direction | the direction of first branching: 1(up), -1(down) | |
value | the fractional solution value of variable varInd |
Definition at line 92 of file BlisBranchObjectInt.h.
References BLIS_BO_INT, flopc::ceil(), down_, flopc::floor(), BcpsBranchObject::model(), BcpsBranchObject::objectIndex_, BcpsBranchObject::type_, up_, and BcpsBranchObject::value_.
BlisBranchObjectInt::BlisBranchObjectInt | ( | BlisModel * | model, | |
int | varInd, | |||
int | direction, | |||
double | lowerValue, | |||
double | upperValue | |||
) | [inline] |
Create a degenerate branching object.
Specifies a `one-direction branch'. Calling branch() for this object will always result in lowerValue <= x <= upperValue. Used to fix a variable when lowerValue = upperValue.
Definition at line 114 of file BlisBranchObjectInt.h.
References BLIS_BO_INT, down_, BcpsBranchObject::numBranchesLeft_, BcpsBranchObject::type_, and up_.
BlisBranchObjectInt::BlisBranchObjectInt | ( | const BlisBranchObjectInt & | ) |
Copy constructor.
virtual BlisBranchObjectInt::~BlisBranchObjectInt | ( | ) | [inline, virtual] |
BlisBranchObjectInt::BlisBranchObjectInt | ( | ) | [inline] |
Default constructor.
Definition at line 53 of file BlisBranchObjectInt.h.
References BlisBranchingObjectTypeInt, down_, BcpsBranchObject::type_, and up_.
BlisBranchObjectInt::BlisBranchObjectInt | ( | BlisModel * | model, | |
int | varInd, | |||
int | direction, | |||
double | value | |||
) | [inline] |
Construct a branching object, which branching on variable varInd.
varInd | the index of integer variable in object set | |
direction | the direction of first branching: 1(up), -1(down) | |
value | the fractional solution value of variable varInd |
Definition at line 69 of file BlisBranchObjectInt.h.
References BlisBranchingObjectTypeInt, flopc::ceil(), down_, flopc::floor(), BcpsBranchObject::model(), BcpsBranchObject::objectIndex_, BcpsBranchObject::type_, up_, and BcpsBranchObject::value_.
BlisBranchObjectInt::BlisBranchObjectInt | ( | BlisModel * | model, | |
int | varInd, | |||
int | intScore, | |||
double | dblScore, | |||
int | direction, | |||
double | value | |||
) | [inline] |
Construct a branching object, which branching on variable varInd.
varInd | the index of integer variable in object set | |
intScore | the integer score/goodness | |
dblScore | the double score/goodness | |
direction | the direction of first branching: 1(up), -1(down) | |
value | the fractional solution value of variable varInd |
Definition at line 91 of file BlisBranchObjectInt.h.
References BlisBranchingObjectTypeInt, flopc::ceil(), down_, flopc::floor(), BcpsBranchObject::model(), BcpsBranchObject::objectIndex_, BcpsBranchObject::type_, up_, and BcpsBranchObject::value_.
BlisBranchObjectInt::BlisBranchObjectInt | ( | BlisModel * | model, | |
int | varInd, | |||
int | direction, | |||
double | lowerValue, | |||
double | upperValue | |||
) | [inline] |
Create a degenerate branching object.
Specifies a `one-direction branch'. Calling branch() for this object will always result in lowerValue <= x <= upperValue. Used to fix a variable when lowerValue = upperValue.
Definition at line 113 of file BlisBranchObjectInt.h.
References BlisBranchingObjectTypeInt, down_, BcpsBranchObject::numBranchesLeft_, BcpsBranchObject::type_, and up_.
BlisBranchObjectInt::BlisBranchObjectInt | ( | const BlisBranchObjectInt & | ) |
Copy constructor.
virtual BlisBranchObjectInt::~BlisBranchObjectInt | ( | ) | [inline, virtual] |
BlisBranchObjectInt& BlisBranchObjectInt::operator= | ( | const BlisBranchObjectInt & | rhs | ) |
Assignment operator.
virtual BcpsBranchObject* BlisBranchObjectInt::clone | ( | ) | const [inline, virtual] |
Clone.
Implements BcpsBranchObject.
Definition at line 137 of file BlisBranchObjectInt.h.
References BlisBranchObjectInt().
virtual double BlisBranchObjectInt::branch | ( | bool | normalBranch = false |
) | [virtual] |
Set the bounds for the variable according to the current arm of the branch and advances the object state to the next arm.
Returns change in guessed objective on next branch.
Implements BcpsBranchObject.
virtual void BlisBranchObjectInt::print | ( | bool | normalBranch | ) | [virtual] |
const double* BlisBranchObjectInt::getDown | ( | ) | const [inline] |
const double* BlisBranchObjectInt::getUp | ( | ) | const [inline] |
AlpsReturnStatus BlisBranchObjectInt::encodeBlis | ( | AlpsEncoded * | encoded | ) | const [inline, protected] |
Pack Blis portion to an encoded object.
Definition at line 161 of file BlisBranchObjectInt.h.
References AlpsReturnStatusOk, down_, up_, and AlpsEncoded::writeRep().
Referenced by encode().
AlpsReturnStatus BlisBranchObjectInt::decodeBlis | ( | AlpsEncoded & | encoded | ) | [inline, protected] |
Unpack Blis portion from an encoded object.
Definition at line 177 of file BlisBranchObjectInt.h.
References AlpsReturnStatusOk, down_, AlpsEncoded::readRep(), and up_.
Referenced by decode().
virtual AlpsReturnStatus BlisBranchObjectInt::encode | ( | AlpsEncoded * | encoded | ) | const [inline, virtual] |
Pack to an encoded object.
Reimplemented from BcpsBranchObject.
Definition at line 194 of file BlisBranchObjectInt.h.
References AlpsReturnStatusOk, BcpsBranchObject::encodeBcps(), and encodeBlis().
virtual AlpsReturnStatus BlisBranchObjectInt::decode | ( | AlpsEncoded & | encoded | ) | [inline, virtual] |
Unpack a branching object from an encoded object.
Reimplemented from BcpsBranchObject.
Definition at line 204 of file BlisBranchObjectInt.h.
References AlpsReturnStatusOk, BcpsBranchObject::decodeBcps(), and decodeBlis().
BlisBranchObjectInt& BlisBranchObjectInt::operator= | ( | const BlisBranchObjectInt & | rhs | ) |
Assignment operator.
virtual BcpsBranchObject* BlisBranchObjectInt::clone | ( | ) | const [inline, virtual] |
Clone.
Implements BcpsBranchObject.
Definition at line 136 of file BlisBranchObjectInt.h.
References BlisBranchObjectInt().
virtual double BlisBranchObjectInt::branch | ( | bool | normalBranch = false |
) | [virtual] |
Set the bounds for the variable according to the current arm of the branch and advances the object state to the next arm.
Returns change in guessed objective on next branch.
Implements BcpsBranchObject.
virtual void BlisBranchObjectInt::print | ( | bool | normalBranch | ) | [virtual] |
const double* BlisBranchObjectInt::getDown | ( | ) | const [inline] |
const double* BlisBranchObjectInt::getUp | ( | ) | const [inline] |
AlpsReturnStatus BlisBranchObjectInt::encodeBlis | ( | AlpsEncoded * | encoded | ) | const [inline, protected] |
Pack Blis portion to an encoded object.
Definition at line 160 of file BlisBranchObjectInt.h.
References AlpsReturnStatusOk, down_, up_, and AlpsEncoded::writeRep().
AlpsReturnStatus BlisBranchObjectInt::decodeBlis | ( | AlpsEncoded & | encoded | ) | [inline, protected] |
Unpack Blis portion from an encoded object.
Definition at line 176 of file BlisBranchObjectInt.h.
References AlpsReturnStatusOk, down_, AlpsEncoded::readRep(), and up_.
virtual AlpsReturnStatus BlisBranchObjectInt::encode | ( | AlpsEncoded * | encoded | ) | const [inline, virtual] |
Pack to an encoded object.
Reimplemented from BcpsBranchObject.
Definition at line 193 of file BlisBranchObjectInt.h.
References AlpsReturnStatusOk, BcpsBranchObject::encodeBcps(), and encodeBlis().
virtual AlpsReturnStatus BlisBranchObjectInt::decode | ( | AlpsEncoded & | encoded | ) | [inline, virtual] |
Unpack a branching object from an encoded object.
Reimplemented from BcpsBranchObject.
Definition at line 203 of file BlisBranchObjectInt.h.
References AlpsReturnStatusOk, BcpsBranchObject::decodeBcps(), and decodeBlis().
double BlisBranchObjectInt::down_ [protected] |
Down_[0]: the lower bound of down arm; Down_[1]: the upper bound of down arm;.
Definition at line 45 of file BlisBranchObjectInt.h.
Referenced by BlisBranchObjectInt(), decodeBlis(), encodeBlis(), and getDown().
double BlisBranchObjectInt::up_ [protected] |
Up_[0]: the lower bound of upper arm; Up_[1]: the upper bound of upper arm;.
Definition at line 49 of file BlisBranchObjectInt.h.
Referenced by BlisBranchObjectInt(), decodeBlis(), encodeBlis(), and getUp().