blob: 1ede7bed0151bfd09d6b150aec7b0a493622eb7a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
#include <cstddef>
#include <cstring>
#include <list>
#include <utility>
#include <vector>
namespace TehImage
{
class HashTable
{
private:
const size_t TABLE_SIZE;
std::vector<std::list<std::pair<unsigned int, unsigned int>>> table;
public:
HashTable(size_t size);
unsigned int hashFunction(char key[3]);
void insert(char key[3], unsigned int value);
void remove(char key[3]);
unsigned int get(char key[3]);
bool contains(char key[3]);
};
}
|