-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.h
29 lines (24 loc) · 964 Bytes
/
utils.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
#ifndef UTILS_H_INCLUDED
#define UTILS_H_INCLUDED
#include<iostream>
#include<string.h>
#include<unordered_map>
#include "generic_vector.h"
#include "custom_suffix_tree_structs.h"
#include "mutex"
using namespace std;
void print(string word);
void printVector(vector<int> vec, string msg);
void printVec(vector<int> vec);
void printBoolVec(vector<bool> vec);
char* append(const char *s, char c);
void quicksort(int_vector* x, int start, int end);
void quicksort_of_nodes(nodes_vector* x, int start, int end);
void quicksort_of_indexes_2(const char* S,vector<int>& indexes, int start, int end,int start_offset);
void quicksort_of_indexes(const char* S,vector<int>& indexes, int start, int end);
void print_substring(const char* str,int n);
int fast_compare( const char *ptr0, const char *ptr1, int len );
char* get_substring(const char* basestring,int len);
size_t get_hash_of_subsring(char* str);
unsigned long hash_substring(const char *str,int size);
#endif