-
Notifications
You must be signed in to change notification settings - Fork 0
/
MONI_K.h
30 lines (25 loc) · 1.4 KB
/
MONI_K.h
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
27
28
29
30
#ifndef MONI_K_MONI_K_H
#define MONI_K_MONI_K_H
#include <string>
#include <sdsl/wt_blcd.hpp>
#include <vector>
#include "Tables.h"
#define TABLE2NUMCOLUMNS 9
#define TABLE3NUMCOLUMNS 4
#define TABLE4NUMCOLUMNS 3
#define STRING_SEPARATOR '#'
#define KCONSTRUCTION true
std::vector<std::string> readTestStrings(const std::string& fileName);
int LCE(const std::string&, unsigned int, unsigned int);
void updateRow(const std::string&, char, MONI_Table, unsigned int&, unsigned int&, unsigned int&, unsigned int&, int);
void LFStep(MONI_Table, unsigned int&, unsigned int&, unsigned int&, sdsl::wt_blcd<>&, int);
unsigned int exponentialSearch(unsigned int*, unsigned int, unsigned int, int);
unsigned int pred2D(unsigned int, const unsigned int*, unsigned int, unsigned int, int);
unsigned int phi(Phi_Table, unsigned int&, unsigned int, int r);
unsigned int inversePhi(Inverse_Phi_Table, unsigned int&, unsigned int, int r);
unsigned int LCPStep(Phi_Table, unsigned int, unsigned int);
void preCalcMONIK(unsigned int**, MONI_Table &tableMONI, unsigned int startj, int r, sdsl::wt_blcd<> &wtBlcd,
const std::string &pattern, const std::string &text, int k, int n);
void onlineMONIK(unsigned int**, MONI_Table&, Phi_Table&, Inverse_Phi_Table&, unsigned int, int,
sdsl::wt_blcd<>&, const std::string&, const std::string&, int);
#endif //MONI_K_MONI_K_H