splaytree.h
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:1k
源码类别:

midi

开发平台:

Unix_Linux

  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. void * splay_find(void * key, splaytree_t * t);
  8. int splay_insert(void * data, void * key, splaytree_t * t);
  9. int splay_insert_link(const void * alias_key, void * orig_key, splaytree_t * splaytree);
  10. int splay_delete(void * key, splaytree_t * splaytree);
  11. int splay_size(splaytree_t * t);
  12. splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), void (*free_key)());
  13. int destroy_splaytree(splaytree_t * splaytree);
  14. void splay_traverse(void (*func_ptr)(), splaytree_t * splaytree);
  15. splaynode_t  * get_splaynode_of(void * key, splaytree_t * splaytree);
  16. void * splay_find_above_min(void * key, splaytree_t * root);
  17. void * splay_find_below_max(void * key, splaytree_t * root);
  18. void * splay_find_min(splaytree_t * t);
  19. void * splay_find_max(splaytree_t * t);
  20. #endif