16 #ifndef KnapSolution_h
17 #define KnapSolution_h
71 virtual void print(std::ostream& os)
const;
KnapSolution(const KnapModel *m)
virtual AlpsKnowledge * decode(AlpsEncoded &) const
The method that decodes the node from a encoded object.
int size_
The solution (indicator vector for the items) and its value.
This data structure is to contain the packed form of an encodable knowledge.
int getSize() const
Get the size of the solution.
const KnapModel * model_
To access model data.
KnapSolution(int s, int *&sol, int v, const KnapModel *m)
virtual void print(std::ostream &os) const
Print out the solution.
virtual AlpsEncoded * encode() const
The method that encodes the node into a encoded object.
The abstract base class of any user-defined class that Alps has to know about in order to encode/deco...
int getSolution(int i) const
Get item i in the solution vector.
const KnapModel * getModel() const
Get model data.
double getObjValue() const
Get the best solution value.
virtual double getQuality() const