#include <KnapSolution.h>


Public Member Functions | |
| KnapSolution (const KnapModel *m) | |
| KnapSolution (int s, int *&sol, int v, const KnapModel *m) | |
| ~KnapSolution () | |
| double | getObjValue () const |
| Get the best solution value. More... | |
| virtual double | getQuality () const |
| int | getSize () const |
| Get the size of the solution. More... | |
| int | getSolution (int i) const |
| Get item i in the solution vector. More... | |
| const KnapModel * | getModel () const |
| Get model data. More... | |
| virtual void | print (std::ostream &os) const |
| Print out the solution. More... | |
| virtual AlpsEncoded * | encode () const |
| The method that encodes the node into a encoded object. More... | |
| virtual AlpsKnowledge * | decode (AlpsEncoded &) const |
| The method that decodes the node from a encoded object. More... | |
Public Member Functions inherited from AlpsSolution | |
| AlpsSolution () | |
| Default constructor. More... | |
| AlpsSolution (const AlpsNodeIndex_t i, const int d) | |
| Constructor to set index and depth. More... | |
| virtual | ~AlpsSolution () |
| Destructor. More... | |
| AlpsNodeIndex_t | getIndex () |
| Get index where solution was found. More... | |
| void | setIndex (const AlpsNodeIndex_t i) |
| Set index where solution was found. More... | |
| int | getDepth () |
| Get depth where solution was found. More... | |
| void | setDepth (const int d) |
| Set depth where solution was found. More... | |
Public Member Functions inherited from AlpsKnowledge | |
| AlpsKnowledge () | |
| virtual | ~AlpsKnowledge () |
| KnowledgeType | getType () |
| void | setType (KnowledgeType t) |
| virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) |
| Pack into a encode object. More... | |
| AlpsEncoded * | getEncoded () const |
| Get/set encoded. More... | |
| void | setEncoded (AlpsEncoded *e) |
Private Attributes | |
| int | size_ |
| The solution (indicator vector for the items) and its value. More... | |
| int * | solution_ |
| int | value_ |
| const KnapModel * | model_ |
| To access model data. More... | |
Additional Inherited Members | |
Protected Attributes inherited from AlpsKnowledge | |
| KnowledgeType | type_ |
Definition at line 24 of file KnapSolution.h.
|
inline |
Definition at line 35 of file KnapSolution.h.
|
inline |
Definition at line 42 of file KnapSolution.h.
|
inline |
Definition at line 49 of file KnapSolution.h.
|
inline |
Get the best solution value.
Definition at line 57 of file KnapSolution.h.
|
inlinevirtual |
Definition at line 59 of file KnapSolution.h.
|
inline |
Get the size of the solution.
Definition at line 62 of file KnapSolution.h.
|
inline |
Get item i in the solution vector.
Definition at line 65 of file KnapSolution.h.
|
inline |
Get model data.
Definition at line 68 of file KnapSolution.h.
|
virtual |
Print out the solution.
Reimplemented from AlpsSolution.
|
virtual |
The method that encodes the node into a encoded object.
Reimplemented from AlpsKnowledge.
|
virtual |
The method that decodes the node from a encoded object.
Reimplemented from AlpsKnowledge.
|
private |
The solution (indicator vector for the items) and its value.
Definition at line 27 of file KnapSolution.h.
|
private |
Definition at line 28 of file KnapSolution.h.
|
private |
Definition at line 29 of file KnapSolution.h.
|
private |
To access model data.
Definition at line 32 of file KnapSolution.h.
1.8.5