#ifndef BUCKETTEST_H
#define BUCKETTEST_H

#include <vector>
using namespace std;

#include <typedefs.h>

class buckettest
{
  /** Fill a array with random values [0.0,1.0). */
  static void fill(double * data, uintc n);
 
  /** This is the worst situation: all the data is in 
      the one place. */
  static void fillbad(double * data, uintc n);

  /** Are the two vectors equal in both their 
      elements and their order? The first
      vector is sorted. */
  static boolc verifyequalvectors
  (
    vector<double> & v1,
    vector<double> const & v2
  );
  /** Time a bucket sort. */
  static void createandtest(uintc n);
  /** Time a hybrid bucket sort. */
  static void createandtest2(uintc n, uintc chainmax );
  /** Time a hybrid bucket sort with bad data. */
  static void createandtest3(uintc n, uintc chainmax );
public:

  /** Brief description of each test. */
  static string doc[];

  /** Use bucket: sorting a array of doubles in range [0.0,1.0). */
  static void test01();

  /** Testing the buckets sorting time of doubles in
      the range [0.0,1.0) tested in progressive
      powers of two. */
  static void test02();

  /** Test the hybrid bucket sort time of doubles in
      the range [0.0,1.0) tested in progressive
      powers of two. */
  static void test03();

  /** Test hybrid bucket sort with bad data. */
  static void test04();

};


#endif



