C Project Template
Loading...
Searching...
No Matches
GarbleFilter.h
1#ifndef GARBLEFILTER_H
2#define GARBLEFILTER_H
3
4#include <string.h>
5#include <assert.h>
6#include <stdbool.h>
7#include "utils.h"
8
9typedef struct {
10 int occur[N_ASCII_ELEMENT];
11 int obs[N_ASCII_ELEMENT];
12 int nexceed;
13 int noccur;
14} occurText;
15
16occurText init_occurText();
17void add_obs(char, occurText*);
18void del_obs(char, occurText*);
19bool satisfied_obs(occurText);
20
21//Preprocessing: Garble Text
22
26void get_region_occurrence(char*, occurText*, int str, int end);
27
28//Locate Garble Text
29
36bool next_garble_region(char* text, int* tail, int* head, int textlen, occurText*);
37
38bool leftist_smallest_garble_region(char* text, int textlen, char* garble, int garblelen, int* tail, int* head);
39
41void slice_text(char* text, int tail, int head, int textlen);
42
49void GarbleTextFilter(char* text, char* garble);
50
51
52
53
54#endif
Definition GarbleFilter.h:9
General Utilities for C language.