00001 #ifndef SPLAYTREE_H 00002 #define SPLAYTREE_H 00003 #define REGULAR_NODE_TYPE 0 00004 #define SYMBOLIC_NODE_TYPE 1 00005 00006 #define PERFECT_MATCH 0 00007 #define CLOSEST_MATCH 1 00008 00009 00010 00011 inline void * splay_find(void * key, splaytree_t * t); 00012 inline int splay_insert(void * data, void * key, splaytree_t * t); 00013 inline int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * splaytree); 00014 inline int splay_delete(void * key, splaytree_t * splaytree); 00015 inline int splay_size(splaytree_t * t); 00016 inline splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), void (*free_key)()); 00017 inline int destroy_splaytree(splaytree_t * splaytree); 00018 inline void splay_traverse(void (*func_ptr)(), splaytree_t * splaytree); 00019 inline splaynode_t * get_splaynode_of(void * key, splaytree_t * splaytree); 00020 inline void * splay_find_above_min(void * key, splaytree_t * root); 00021 inline void * splay_find_below_max(void * key, splaytree_t * root); 00022 inline void * splay_find_min(splaytree_t * t); 00023 inline void * splay_find_max(splaytree_t * t); 00024 #endif