C Project Template
Loading...
Searching...
No Matches
src
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
9
typedef
struct
{
10
int
occur[N_ASCII_ELEMENT];
11
int
obs[N_ASCII_ELEMENT];
12
int
nexceed;
13
int
noccur;
14
}
occurText
;
15
16
occurText
init_occurText();
17
void
add_obs(
char
,
occurText
*);
18
void
del_obs(
char
,
occurText
*);
19
bool
satisfied_obs(
occurText
);
20
21
//Preprocessing: Garble Text
22
26
void
get_region_occurrence(
char
*,
occurText
*,
int
str,
int
end);
27
28
//Locate Garble Text
29
36
bool
next_garble_region(
char
* text,
int
* tail,
int
* head,
int
textlen,
occurText
*);
37
38
bool
leftist_smallest_garble_region(
char
* text,
int
textlen,
char
* garble,
int
garblelen,
int
* tail,
int
* head);
39
41
void
slice_text(
char
* text,
int
tail,
int
head,
int
textlen);
42
49
void
GarbleTextFilter(
char
* text,
char
* garble);
50
51
52
53
54
#endif
occurText
Definition
GarbleFilter.h:9
utils.h
General Utilities for C language.
Generated by
1.10.0