Function ADS::zaino

Function Documentation

inline long ADS::zaino(const std::vector<long> &p, const std::vector<long> &v, long C, long *solved = nullptr)

zaino(): the best profit by memoization in a hash table; the number of subproblems solved goes to *solved, if given

Pre:

|p| = |v|, p , v >= 0, C >= 0