Alps
2.0.2
|
Here, we need to fill in what the node description will look like. More...
#include <KnapNodeDesc.h>
Public Member Functions | |
KnapNodeDesc (KnapModel *model) | |
KnapNodeDesc (KnapModel *model, KnapVarStatus *&st, int cap, int val) | |
virtual | ~KnapNodeDesc () |
void | setVarStatus (const int i, const KnapVarStatus status) |
KnapVarStatus | getVarStatus (const int i) |
const KnapVarStatus * | getVarStati () const |
int | getUsedCapacity () const |
int | getUsedValue () const |
KnapModel * | model () |
const KnapModel * | model () const |
Public Member Functions inherited from AlpsNodeDesc | |
AlpsNodeDesc () | |
Default constructor. More... | |
AlpsNodeDesc (AlpsKnowledgeBroker *broker) | |
virtual | ~AlpsNodeDesc () |
Destructor. More... | |
AlpsEncoded * | encode () const |
Pack this into an AlpsEncoded object and return a pointer to it. More... | |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) const |
Pack this into an AlpsEncoded object and return a pointer to it. More... | |
Public Member Functions inherited from AlpsKnowledge | |
AlpsKnowledge () | |
Default constructor. More... | |
AlpsKnowledge (AlpsKnowledgeType type) | |
AlpsKnowledge (AlpsKnowledgeType type, AlpsKnowledgeBroker *broker) | |
virtual | ~AlpsKnowledge () |
Destructor. More... | |
AlpsKnowledgeType | getType () const |
Get knowledge type. More... | |
void | setType (AlpsKnowledgeType t) |
Set knowledge type. More... | |
AlpsKnowledgeBroker * | broker () |
Get pointer to the knowledge broker. More... | |
const AlpsKnowledgeBroker * | broker () const |
Get pointer to the knowledge broker. More... | |
void | setBroker (AlpsKnowledgeBroker *broker) |
Set knowledge broker. More... | |
AlpsEncoded * | encode () const |
Encode the content of this into an AlpsEncoded object and return a pointer to it. More... | |
Private Attributes | |
KnapModel * | model_ |
KnapVarStatus * | varStatus_ |
This array keeps track of which variables have been fixed by branching and which are still free. More... | |
int | usedCapacity_ |
The total size of the items fixed to be put into the knapsack. More... | |
int | usedValue_ |
Encode/Decode inherited from #AlpsKnowledge. | |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) const |
Pack this node description into the given AlpsEncoded object. More... | |
virtual AlpsReturnStatus | decodeToSelf (AlpsEncoded &encoded) |
Unpack fields from the given AlpsEncoded object. More... | |
virtual AlpsNodeDesc * | decode (AlpsEncoded &encoded) const |
Decode the given AlpsEncoded object into a new AlpsKnowledge object and return a pointer to it. More... | |
AlpsEncoded * | encode () const |
Grab encode function from AlpsKnowledge. More... | |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) const |
Grab encode function from AlpsKnowledge. More... | |
KnapNodeDesc (KnapNodeDesc const &other) | |
Disable copy constructor. More... | |
KnapNodeDesc & | operator= (KnapNodeDesc const &rhs) |
Disable copy assignment operator. More... | |
Additional Inherited Members | |
Public Attributes inherited from AlpsKnowledge | |
AlpsKnowledgeBroker * | broker_ |
Here, we need to fill in what the node description will look like.
For now, we will not use differencing – just explicitly represent it. Probably this means that we will just store the original problem data and a list of the variables that have been fixed.
Definition at line 50 of file KnapNodeDesc.h.
KnapNodeDesc::KnapNodeDesc | ( | KnapModel * | model | ) |
KnapNodeDesc::KnapNodeDesc | ( | KnapModel * | model, |
KnapVarStatus *& | st, | ||
int | cap, | ||
int | val | ||
) |
|
virtual |
|
private |
Disable copy constructor.
void KnapNodeDesc::setVarStatus | ( | const int | i, |
const KnapVarStatus | status | ||
) |
KnapVarStatus KnapNodeDesc::getVarStatus | ( | const int | i | ) |
const KnapVarStatus* KnapNodeDesc::getVarStati | ( | ) | const |
|
inline |
Definition at line 72 of file KnapNodeDesc.h.
|
inline |
Definition at line 73 of file KnapNodeDesc.h.
|
inline |
Definition at line 75 of file KnapNodeDesc.h.
|
inline |
Definition at line 76 of file KnapNodeDesc.h.
|
virtual |
Pack this node description into the given AlpsEncoded object.
Reimplemented from AlpsNodeDesc.
|
virtual |
Unpack fields from the given AlpsEncoded object.
Reimplemented from AlpsNodeDesc.
|
virtual |
Decode the given AlpsEncoded object into a new AlpsKnowledge object and return a pointer to it.
User application sub-classes should implement this since the returned pointer will point to user sub-class instances.
Implements AlpsKnowledge.
|
private |
Disable copy assignment operator.
AlpsEncoded* AlpsKnowledge::encode |
Grab encode function from AlpsKnowledge.
virtual AlpsReturnStatus AlpsKnowledge::encode |
Grab encode function from AlpsKnowledge.
|
private |
Definition at line 51 of file KnapNodeDesc.h.
|
private |
This array keeps track of which variables have been fixed by branching and which are still free.
Definition at line 56 of file KnapNodeDesc.h.
|
private |
The total size of the items fixed to be put into the knapsack.
Definition at line 58 of file KnapNodeDesc.h.
|
private |
Definition at line 59 of file KnapNodeDesc.h.