Bachelors_Thesis_Code/processes.hpp
Knyffen c6b6329134 Abstrack simple string matching to a process
The process contains the fingerprinting function along with a queue
representing the sliding window. This means that the user no longer
needs to remember the outgoing character when streaming the text.
2021-11-14 16:19:11 +01:00

24 lines
500 B
C++

#ifndef PROCESSES_H
#define PROCESSES_H
#include "Rabin_fingerprint.hpp"
#include "general_library.hpp"
#include <stdint.h>
#include <queue>
class Rabin_fingerprint_process {
public:
Rabin_fingerprint_process(uint32_t irr_poly, size_t window_size_in_bits);
void stream_char(char c);
void stream_bit(bool b);
uint32_t get_fingerprint();
private:
std::queue<bool> window;
size_t window_size_in_bits;
Rabin_fingerprint phi;
};
#endif