Storage mechanism using linear probing hash keys.  
More...
#include <iostream>
#include <vector>
|  | 
| using | linear_probing::Entry = Entry | 
|  | 
|  | 
| int | linear_probing::notPresent | 
|  | 
| std::vector< Entry > | linear_probing::table | 
|  | 
| int | linear_probing::totalSize | 
|  | 
| int | linear_probing::tomb = -1 | 
|  | 
| int | linear_probing::size | 
|  | 
| bool | linear_probing::rehashing | 
|  | 
Storage mechanism using linear probing hash keys. 
- Author
- achance6 
- 
Krishna Vedala 
- Note
- The implementation can be optimized by using OOP style. 
◆ main()
Main function 
- Returns
- 0 on success 
  224           {
  225    int cmd = 0, 
hash = 0, key = 0;
 
  226    std::cout << 
"Enter the initial size of Hash Table. = ";
 
  229    bool loop = true;
  230    while (loop) {
  240        switch (cmd) {
  241            case 1:
  245                break;
  246            case 2:
  250                break;
  251            case 3: {
  255                if (entry.
key == linear_probing::notPresent) {
 
  257                }
  258                break;
  259            }
  260            case 4:
  261                std::cout << 
"Enter element to generate hash = ";
 
  265                break;
  266            case 5:
  268                break;
  269            default:
  270                loop = false;
  271                break;
  272                
  273        }
  275    }
  276    return 0;
  277}
void * hash(const std::string &message)
Converts the string to bytestring and calls the main algorithm.
Definition: md5.cpp:287
void addInfo(int key)
Definition: linear_probing_hash_table.cpp:186
size_t hashFxn(int key)
Hash a key. Uses the STL library's std::hash() function.
Definition: linear_probing_hash_table.cpp:46
int linearProbe(int key, bool searching)
Definition: linear_probing_hash_table.cpp:55
void removalInfo(int key)
Definition: linear_probing_hash_table.cpp:201
void display()
Definition: linear_probing_hash_table.cpp:120
Definition: linear_probing_hash_table.cpp:35
int key
key value
Definition: linear_probing_hash_table.cpp:37