File: fch_buckets.h

package info (click to toggle)
gobject-introspection 1.86.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 72,464 kB
  • sloc: ansic: 562,805; python: 23,750; xml: 16,240; perl: 1,878; yacc: 1,720; sh: 1,139; lex: 513; cpp: 487; makefile: 197; javascript: 15; lisp: 1
file content (30 lines) | stat: -rw-r--r-- 1,041 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef __CMPH_FCH_BUCKETS_H__
#define __CMPH_FCH_BUCKETS_H__

#include "cmph_types.h"
typedef struct __fch_buckets_t fch_buckets_t;

fch_buckets_t * fch_buckets_new(cmph_uint32 nbuckets);

cmph_uint8 fch_buckets_is_empty(fch_buckets_t * buckets, cmph_uint32 index);

void fch_buckets_insert(fch_buckets_t * buckets, cmph_uint32 index, char * key, cmph_uint32 length);

cmph_uint32 fch_buckets_get_size(fch_buckets_t * buckets, cmph_uint32 index);

char * fch_buckets_get_key(fch_buckets_t * buckets, cmph_uint32 index, cmph_uint32 index_key);

cmph_uint32 fch_buckets_get_keylength(fch_buckets_t * buckets, cmph_uint32 index, cmph_uint32 index_key);

// returns the size of biggest bucket.
cmph_uint32 fch_buckets_get_max_size(fch_buckets_t * buckets);

// returns the number of buckets.
cmph_uint32 fch_buckets_get_nbuckets(fch_buckets_t * buckets);

cmph_uint32 * fch_buckets_get_indexes_sorted_by_size(fch_buckets_t * buckets);

void fch_buckets_print(fch_buckets_t * buckets);

void fch_buckets_destroy(fch_buckets_t * buckets);
#endif