Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

sfhashfcn.h File Reference

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>

Go to the source code of this file.

Typedefs

typedef _SFHASHFCN SFHASHFCN

Functions

SFHASHFCNsfhashfcn_new (int nrows)
void sfhashfcn_free (SFHASHFCN *p)
unsigned sfhashfcn_hash (SFHASHFCN *p, unsigned char *d, int n)
int sfhashfcn_set_keyops (SFHASHFCN *p, unsigned(*hash_fcn)(SFHASHFCN *p, unsigned char *d, int n), int(*keycmp_fcn)(const void *s1, const void *s2, size_t n))


Typedef Documentation

typedef struct _SFHASHFCN SFHASHFCN
 


Function Documentation

void sfhashfcn_free SFHASHFCN p  ) 
 

Definition at line 56 of file sfhashfcn.c.

Referenced by sfghash_delete(), and sfxhash_delete().

unsigned sfhashfcn_hash SFHASHFCN p,
unsigned char *  d,
int  n
 

Definition at line 64 of file sfhashfcn.c.

References _SFHASHFCN::hardener, _SFHASHFCN::scale, and _SFHASHFCN::seed.

Referenced by sfhashfcn_new().

SFHASHFCN* sfhashfcn_new int  nrows  ) 
 

Definition at line 36 of file sfhashfcn.c.

References calcNextPrime(), _SFHASHFCN::hardener, _SFHASHFCN::hash_fcn, _SFHASHFCN::keycmp_fcn, memcmp(), _SFHASHFCN::scale, _SFHASHFCN::seed, and sfhashfcn_hash().

Referenced by sfghash_new(), and sfxhash_new().

int sfhashfcn_set_keyops SFHASHFCN h,
unsigned(*)(SFHASHFCN *p, unsigned char *d, int n)  hash_fcn,
int(*)(const void *s1, const void *s2, size_t n)  keycmp_fcn
 

Make sfhashfcn use a separate set of operators for the backend.

Parameters:
h sfhashfcn ptr
hash_fcn user specified hash function
keycmp_fcn user specified key comparisoin function

Definition at line 84 of file sfhashfcn.c.

References _SFHASHFCN::hash_fcn, and _SFHASHFCN::keycmp_fcn.

Referenced by sfxhash_set_keyops().


Generated on Sun May 14 14:51:26 2006 by  doxygen 1.4.2