Function ADS::firstFit
Defined in File Approximation.h
Function Documentation
-
inline std::vector<int> ADS::firstFit(const std::vector<long> &A, long k, bool decreasing = false)
ff: the box of each object, the first one with room for it, the objects in the order given or, if decreasing, in decreasing order of volume (ffd); the boxes are 0 , 1 , …
- Pre:
each volume is in [ 0 , k ]
- Post:
no box is filled beyond k