splaytree.h
上传用户:riyaled888
上传日期:2009-03-27
资源大小:7338k
文件大小:1k
源码类别:

多媒体

开发平台:

MultiPlatform

  1. #ifndef SPLAYTREE_H
  2. #define SPLAYTREE_H
  3. #define REGULAR_NODE_TYPE 0
  4. #define SYMBOLIC_NODE_TYPE 1
  5. #define PERFECT_MATCH 0
  6. #define CLOSEST_MATCH 1
  7. inline void * splay_find(void * key, splaytree_t * t);
  8. inline int splay_insert(void * data, void * key, splaytree_t * t);
  9. inline int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * splaytree);
  10. inline int splay_delete(void * key, splaytree_t * splaytree);
  11. inline int splay_size(splaytree_t * t);
  12. inline splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), void (*free_key)());
  13. inline int destroy_splaytree(splaytree_t * splaytree);
  14. inline void splay_traverse(void (*func_ptr)(), splaytree_t * splaytree);
  15. inline splaynode_t  * get_splaynode_of(void * key, splaytree_t * splaytree);
  16. inline void * splay_find_above_min(void * key, splaytree_t * root);
  17. inline void * splay_find_below_max(void * key, splaytree_t * root);
  18. inline void * splay_find_min(splaytree_t * t);
  19. inline void * splay_find_max(splaytree_t * t);
  20. #endif