Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

fuzzy.c File Reference


Detailed Description

Functions to compute likelihood of two file names being the same file.

Author:
Vidar Madsen
Date:
2002

#include "common.h"
#include "fuzzy.h"
#include "misc.h"
#include "walloc.h"
#include "override.h"

Data Structures

struct  word_entry

Typedefs

typedef word_entry word_entry_t

Functions

 RCSID ("$Id:fuzzy.c, v 1.5 2005/09/10 10:10:36 daichik Exp $")
GSList * fuzzy_make_word_list (const char *str)
gulong fuzzy_word_similarity (const char *a, const char *b)
gulong fuzzy_cmp_word_list (const char *s, GSList *words)
gulong fuzzy_find_score (GSList *a, GSList *b)
gulong fuzzy_compare (const char *str1, const char *str2)


Typedef Documentation

typedef struct word_entry word_entry_t
 


Function Documentation

gulong fuzzy_cmp_word_list const char *  s,
GSList *  words
[static]
 

gulong fuzzy_compare const char *  str1,
const char *  str2
 

Returns:
the similarity of both strings as a value between 0 and (1 << FUZZY_SHIFT).
Attention:
NB: The result will be bogus for strings larger than 1 << (BIT_LENGTH_OF_GULONG - (FUZZY_SHIFT + 2)) chars.

gulong fuzzy_find_score GSList *  a,
GSList *  b
[static]
 

GSList* fuzzy_make_word_list const char *  str  )  [static]
 

gulong fuzzy_word_similarity const char *  a,
const char *  b
[static]
 

RCSID "$Id:fuzzy.  c,
v 1.5 2005/09/10 10:10:36 daichik Exp $" 
 


Generated on Sun Feb 12 10:50:01 2006 for Gtk-Gnutella by doxygen 1.3.6