#include <KnapTreeNode.h>
Public Member Functions | |
KnapTreeNode () | |
KnapTreeNode (KnapModel *model) | |
KnapTreeNode (KnapNodeDesc *&desc) | |
~KnapTreeNode () | |
void | setBranchOn (int b) |
virtual AlpsTreeNode * | createNewTreeNode (AlpsNodeDesc *&desc) const |
The purpose of this function is be able to create the children of a node after branching. | |
virtual int | process (bool isRoot=false, bool rampUp=false) |
virtual std::vector < CoinTriple< AlpsNodeDesc *, AlpsNodeStatus, double > > | branch () |
virtual AlpsEncoded * | encode () const |
This method should encode the content of the object and return a pointer to the encoded form. | |
virtual AlpsKnowledge * | decode (AlpsEncoded &) const |
This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked. | |
Private Member Functions | |
KnapTreeNode (const KnapTreeNode &) | |
KnapTreeNode & | operator= (const KnapTreeNode &) |
Private Attributes | |
int | branchedOn_ |
The index of the branching variable. |
Definition at line 114 of file KnapTreeNode.h.
KnapTreeNode::KnapTreeNode | ( | const KnapTreeNode & | ) | [private] |
KnapTreeNode::KnapTreeNode | ( | ) | [inline] |
Definition at line 125 of file KnapTreeNode.h.
KnapTreeNode::KnapTreeNode | ( | KnapModel * | model | ) | [inline] |
Definition at line 130 of file KnapTreeNode.h.
KnapTreeNode::KnapTreeNode | ( | KnapNodeDesc *& | desc | ) | [inline] |
Definition at line 134 of file KnapTreeNode.h.
KnapTreeNode::~KnapTreeNode | ( | ) | [inline] |
Definition at line 141 of file KnapTreeNode.h.
KnapTreeNode& KnapTreeNode::operator= | ( | const KnapTreeNode & | ) | [private] |
Reimplemented from AlpsTreeNode.
void KnapTreeNode::setBranchOn | ( | int | b | ) | [inline] |
Definition at line 143 of file KnapTreeNode.h.
virtual AlpsTreeNode* KnapTreeNode::createNewTreeNode | ( | AlpsNodeDesc *& | desc | ) | const [virtual] |
The purpose of this function is be able to create the children of a node after branching.
Implements AlpsTreeNode.
virtual int KnapTreeNode::process | ( | bool | isRoot = false , |
|
bool | rampUp = false | |||
) | [virtual] |
virtual std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> > KnapTreeNode::branch | ( | ) | [virtual] |
virtual AlpsEncoded* KnapTreeNode::encode | ( | ) | const [virtual] |
This method should encode the content of the object and return a pointer to the encoded form.
NOTE: This default implementation can not be used when the memory of data members is not continously allocated, for example, some data members are pointers, STL set, map, etc.
Reimplemented from AlpsKnowledge.
virtual AlpsKnowledge* KnapTreeNode::decode | ( | AlpsEncoded & | encoded | ) | const [virtual] |
This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked.
NOTE: This default implementation can not be used when the memory of data members is not continously allocated, for example, some data members are pointers, STL set, map, etc.
Reimplemented from AlpsKnowledge.
int KnapTreeNode::branchedOn_ [private] |
The index of the branching variable.
Definition at line 122 of file KnapTreeNode.h.