projects
/
mstardict
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Imported version 0.2-1
[mstardict]
/
src
/
lib
/
distance.h
1
#ifndef DISTANCE_H
2
#define DISTANCE_H
3
4
#include <glib.h>
5
6
class EditDistance {
7
private:
8
int *d;
9
int currentelements;
10
/*Gets the minimum of three values */
11
inline int minimum( const int a, const int b, const int c )
12
{
13
int min = a;
14
if ( b < min )
15
min = b;
16
if ( c < min )
17
min = c;
18
return min;
19
};
20
public:
21
EditDistance( );
22
~EditDistance( );
23
int CalEditDistance( const gunichar *s, const gunichar *t, const int limit );
24
};
25
26
#endif