#ifndef __LinearHash__h
#define __LinearHash__h

#include "HashTable.h"

//
// Standard Linear Hash Table
//
//
class LinearHash : public HashTable {
protected:
  int    N;                              // Size of hash table
  Key    *keys;                          // Table keys
  Object *data;                          //   and data

// Used for statistical tracking
  int    insertions,                     // Number of insertions
         collisions,                     // Number of times insertion had collision
         iSteps,                         // Number of steps walked during insertions
         searches,                       // Number of searches
         sSteps;                         // Number of steps walked during searches


public:
// Internal functions
  virtual int H(Key key, int index=0);   // Hash function H(k,i,c)

  LinearHash(int size);
  void   Insert(int key, Object data);
  Object Search(int key);
  void   PrintStats();

};

#endif // ifdef __LinearHash__h