Function ADS::fractionalKnapsack

Function Documentation

inline std::vector<double> ADS::fractionalKnapsack(const std::vector<double> &p, const std::vector<double> &v, double C)

zaino(): the fractions x of the objects, by decreasing p / v

Pre:

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

Post:

fractions in [ 0 , 1 ] of volume at most C