Go to the documentation of this file.
27 #ifndef KnapSolution_h
28 #define KnapSolution_h
56 virtual void print(std::ostream& os)
const;
63 std::cerr <<
"Not implemented!" << std::endl;
64 throw std::exception();
KnapSolution & operator=(KnapSolution const &rhs)
Disable copy assignment operator.
virtual AlpsReturnStatus decodeToSelf(AlpsEncoded &encoded)
Decode the given AlpsEncoded object into this.
int getSize() const
Get the size of the solution.
double getObjValue() const
Get the best solution value.
virtual double getQuality() const
virtual void print(std::ostream &os) const
Print out the solution.
The abstract base class of Alps knowledges generated during the search.
KnapSolution(KnapModel *model)
AlpsEncoded * encode() const
Encode the content of this into an AlpsEncoded object and return a pointer to it.
virtual AlpsKnowledge * decode(AlpsEncoded &encoded) const
Decode the given AlpsEncoded object into a new KnapSolution and return a pointer to it.
int getSolution(int i) const
Get item i in the solution vector.
int size_
The solution (indicator vector for the items) and its value.