Function ADS::knapsackApprox
Defined in File Approximation.h
Function Documentation
-
inline std::pair<long, Nodes> ADS::knapsackApprox(const std::vector<long> &p, const std::vector<long> &v, long C, double eps)
the best profit and the objects of an \( \epsilon \)-approximation of ZAINO, profits p and volumes v within C, by the rounded profits
- Pre:
p and v of the same size and not negative, 0 < eps <= 1, C >= 0
- Post:
objects within C, their profit returned