#ifndef HEURISTICS #define HEURISTICS /****************************************************************** * This routine computes a bin-packing of the given set of weights. * The return value is the overall number of bins which were used. * * Params: * w -- an array of the original weights * * N -- the number of such weights * * decreasing -- If true, procedure will do worst-fit decreasing heuristic * If false, worst-fit heuristic (with original order) * * useFastPQ -- If true, will use a FastPQ as the underlying data structure * If false, will use a SlowPQ as the underlying data structure * * verbose -- If true, will generate output to cout listing the * contents and total weight of each bin. If false, does * not generate any output to cout (though still returns * the overall number of bins to the caller) * ******************************************************************/ int worstFit(double* w, int N, bool decreasing, bool useFastPQ, bool verbose); #endif