<commit_before>using namespace std;

#define COUNTOF(x) (sizeof(x)/sizeof(*x))
#define N = 11
#define K = 10

struct interval_t {
	long start, end;
};

struct triplet_t {
	long index;
	struct interval_t interval;
};


long binary_search_left (string &S, long *SA, char comparing_character, long query_offset, long start_interval, long end_interval);

long binary_search_right (string &S, long *SA, char comparing_character, long query_offset, long start_interval, long end_interval);
/*
triplet_t topdown_search (string *S, long *SA, char comparing_character, long query_offset, long start_interval, long end_interval);

interval_t search_string(string *S, long *SA, string query_string); 
*/
/*
triplet_t traverse(p, d:[s..e], M);

void findL (p, i, q);

void collect_MEMs (p, d:[s..e], q:[l..r]);

void find_MEMs(p0); 

triplet_t suffix_link (long offset, long start_interval, long end_interval);

triplet_t expand_link (long offset, long start_interval, long end_interval);
*/






<commit_msg>moved SA and S from global to a function argument<commit_after>using namespace std;

#define COUNTOF(x) (sizeof(x)/sizeof(x[0]))
#define N = 11
#define K = 10

struct interval_t {
	long start, end;
};

struct triplet_t {
	long index;
	struct interval_t interval;
};


long binary_search_left (string &S, long *SA, char comparing_character, long query_offset, long start_interval, long end_interval);

long binary_search_right (string &S, long *SA, char comparing_character, long query_offset, long start_interval, long end_interval);

triplet_t topdown_search (string &S, long *SA, char comparing_character, long query_offset, long start_interval, long end_interval);

interval_t search_string(string &S, long *SA, string query_string); 
/*
triplet_t traverse(p, d:[s..e], M);

void findL (p, i, q);

void collect_MEMs (p, d:[s..e], q:[l..r]);

void find_MEMs(p0); 
*/
triplet_t suffix_link (long offset, long start_interval, long end_interval);

triplet_t expand_link (long offset, long start_interval, long end_interval);








{'fraction_non_alphanumeric': 0.11384918679152292, 'fraction_numerical': 0.005421389847215377, 'mean_word_length': 5.655737704918033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '28802', 'n_tokens_mistral': 712, 'n_tokens_neox': 675, 'n_words': 219}