Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
/* Etype is a class containing data and key. It must contain the following functionality: void printIt(ostream &); // Prints itself
 

Summary: /* Etype is a class containing data and key. It must contain the following functionality:
void printIt(ostream &); // Prints itself
int getHash() // returns an appropriate hash value
bool operator!=(Etype) // compares two Etypes for equality (checks keys)
enum KindOfEntry { Active, Empty, Deleted };
template
class HashEntry
{ public:
Etype element; // The item
KindOfEntry kind; // Active, empty, or deleted
HashEntry(){kind=Empty;}
HashEntry( Etype & E, KindOfEntry k = Empty ) { element = E; kind = k;}
};
template
class HashTable
{ public:
HashTable(ofstream & ,double,int);
~HashTable( ) { delete [ ] hashTbl; }
bool insert( Etype & X ); // Return true if successful
bool remove( Etype & X ); // Return true if successful

  

Source: Allan, Vicki H. - Department of Computer Science, Utah State University

 

Collections: Computer Technologies and Information Sciences