Location:
Search - avl
Search list
Description: 纯C实现的AVL树,Demo是MFC的。非递归的遍历,完全支持添加、删除和搜索节点。设计灵活,容易扩展。以下是API
struct tagAvlTree;
typedef struct tagAvlTree AvlTree;
struct tagAvlNode;
typedef struct tagAvlNode AvlNode;
struct tagAvlNode
{
AvlNode *left;
AvlNode *right;
int32_t height;
uint32_t key;
void *user;
bool_t full;
};
#define AVL_MODE_REPLACE 1
#define AVL_MODE_PERFECT 2
#define AVL_ERROR_MEMORY -1
#define AVL_ERROR_CONFLICT -2
struct tagAvlTree
{
void *user;
AvlNode *root;
uint32_t flags;
bool_t (*dtor)(AvlNode *item);
AvlNode* (*ctor)(uint32_t key, void *user);
int32_t (*compare)(void *key1, void *key2);
};
AvlNode* AvlTraversePrior(AvlTree *tree, AvlNode *item, int32_t (*f)(AvlTree *tree, AvlNode *item, void *user), void *user);//先序遍历
AvlNode* AvlTraverseMiddle(AvlTree *tree, AvlNode *item, int32_t (*f)(AvlTree *tree, AvlNode *item, void *user), void *user);//中序遍历
AvlNode* AvlTraversePost(AvlTree *tree, AvlNode *item, int32_t (*f)(AvlTree *tree, AvlNode *item, void *user), void *user);//后序遍历
AvlNode* AvlTraverseReversePrior(AvlTree *tree, AvlNode *item, int32_t (*f)(AvlTree *tree, AvlNode *item, void *user), void *user);//先序遍历,先右后左
AvlNode* AvlTraverseReverseMiddle(AvlTree *tree, AvlNode *item, int32_t (*f)(AvlTree *tree, AvlNode *item, void *user), void *user);//中序遍历,先右后左
AvlNode* AvlTraverseReversePost(AvlTree *tree, AvlNode *item, int32_t (*f)(AvlTree *tree, AvlNode *item, void *user), void *user);//后序遍历,先右后左
AvlNode* AvlTraverseWide(AvlTree *tree, AvlNode *item, int32_t (*f)(AvlTree *tree, AvlNode *item, void *user), void *user);//广度优先遍历
void AvlCreate(AvlTree *tree);
void AvlDestroy(AvlTree *tree);
AvlNode* AvlMin(AvlNode *root);
AvlNode* AvlMax(AvlNode *root);
AvlNode* AvlPrev(AvlTree *tree, AvlNode *item);
AvlNode* AvlNext(AvlTree *tree, AvlNode *item);
uint32_t AvlDepth(AvlTree *tree, AvlNode *item);
AvlNode* AvlParent(AvlTree *tree, AvlNode *item, uint32_t nth);
AvlNode* AvlCheckBanlance(AvlTree *tree, AvlNode *item);
AvlNode* AvlRemove(AvlTree *tree, uint32_t key, bool_t freeit);
AvlNode* AvlInsert(AvlTree *tree, uint32_t key, void *user);
AvlNode* AvlReplace(AvlTree *tree, uint32_t key, void *user);
AvlNode* AvlIndex(AvlTree *tree, int32_t index);
void AvlSetMode(AvlTree *tree, uint32_t mode);
void AvlClearMode(AvlTree *tree, uint32_t mode);
void AvlInvertMode(AvlTree *tree, uint32_t mode);
uint32_t AvlIsInMode(AvlTree *tree, uint32_t mode);
bool_t AvlAdd(AvlTree *tree, AvlNode *item);
bool_t AvlClone(AvlTree *tree, AvlNode *item, AvlTree* copy);
AvlNode* AvlNear(AvlTree *tree, uint32_t key, int32_t (*compare)(void *key1, void *key2)); //按key查找节点或最临近点
AvlNode* AvlSearch(AvlTree *tree, uint32_t key, int32_t (*compare)(void *key1, void *key2)); //按key查找节点
void* AvlLookup(AvlTree *tree, uint32_t key, int32_t (*compare)(void *key1, void *key2)); //按key查找节点,返回数据
Platform: |
Size: 24543 |
Author: doitfreely |
Hits:
Description: AVL树的创建与基本操作-AVL Tree and the creation of basic operation
Platform: |
Size: 13312 |
Author: 王斌 |
Hits:
Description: Addison-Velski 和 Landis (AVL-Tree s)的二叉树,可以在对数时间内进行标准的操作,如插入、搜索和删除。-Addison-Velski and Landis (AVL- Tree s) of the binary tree, the right time for a few of the standard operation, such as insert, delete and search.
Platform: |
Size: 969728 |
Author: 倪玲 |
Hits:
Description: AVL树的计算代码,内函几个H的头文件。帮助大家使用AVL树-AVL tree calculation code, within the letter H, a few header files. Help you use the AVL tree
Platform: |
Size: 164864 |
Author: 一心 |
Hits:
Description: AVL树的实现代码(包括插入,删除,统计信息等操作)-AVL tree code (including insert, delete, statistical information, such as operations)
Platform: |
Size: 8192 |
Author: 许民皆 |
Hits:
Description: avl平衡树做的电话号码系统!!!可支持查询,修改,删除等操作-AVL tree balance of the telephone numbering system to do! ! ! Support query, modify, delete and other operations
Platform: |
Size: 3072 |
Author: jiangshan |
Hits:
Description: AVLTREE,数据结构中AVL树的C语言实现-AVLTREE, in the AVL tree data structure of the C language
Platform: |
Size: 1024 |
Author: jason |
Hits:
Description: 改进的AVL树构造方法,本文详细讲述了AVL树动态快速的构造方法。-Improved methods of AVL tree structure, this paper to describe in detail the AVL tree fast method of constructing dynamic.
Platform: |
Size: 70656 |
Author: qin |
Hits:
Description: 实现了AVL_tree的插入与删除功能
及AVL_tree的线索化,并心图形的方式打印出结果-Implement insert and remove of a node
in a AVL-tree
Platform: |
Size: 155648 |
Author: runnery |
Hits:
Description: 平衡二叉树的基本操作.包括查找、插入、删除、合并等操作-AVL Basic Functions
Platform: |
Size: 4096 |
Author: serenesunny |
Hits:
Description: avl树的介绍和源代码,包含avl树、红黑树等-introduction to avl tree and R-B tree
Platform: |
Size: 4626432 |
Author: 黄开炳 |
Hits:
Description: AVL树操作代码,借鉴了《算法导论》,具有不错的借鉴价值-AVLtree operation code
Platform: |
Size: 1024 |
Author: 丁易 |
Hits:
Description: avl,数据结构,平衡查找二叉树,支持添加、删除、查找!
Platform: |
Size: 6144 |
Author: 常迪 |
Hits:
Description: This a Pascal library for AVL Trees + graphics demo which demonstrates the library functions and AVL trees behaviour.-This is a Pascal library for AVL Trees + graphics demo which demonstrates the library functions and AVL trees behaviour.
Platform: |
Size: 204800 |
Author: Tomas Dulik |
Hits:
Description: 数据结构 严蔚敏老师书中平衡二叉排序树AVL的实现,添加了书中缺少的部分,包括右平衡操作和最难的删除操作。-Yan Wei-min data structure teacher book AVL balanced binary search tree implementation, adding an integral part of the book, including the right balance of the operation and remove the most difficult operations.
Platform: |
Size: 2048 |
Author: 杨波 |
Hits:
Description: 二叉平衡树(AVL)树的全部实现:各种旋转,插入,删除
Platform: |
Size: 5142 |
Author: gangtioftsu@163.com |
Hits:
Description: 二叉树的ADT、搜索树的ADT、平衡二叉树的ADT。AVL树包含了AVL的建立、查找、删除操作。全部使用类模板,方便调用(ADT for binary tree, ADT for search tree, ADT for balanced binary tree. AVL tree contains the establishment of AVL, find, delete operation. All use of class templates, easy to call)
Platform: |
Size: 5974016 |
Author: 启明jun
|
Hits:
Description: AVL软件、教程及资料
资料不全,但是是本人搜集的全部资料(software,input files,can directly get the output file)
Platform: |
Size: 2936832 |
Author: wanglu888 |
Hits:
Description: 实现AVL 存储结构的建立(插入)、删除、查找算法,并反映各种旋转变化。(Implements the establishment (insertion), deletion, and search algorithms for AVL storage structures and reflects various rotation changes.)
Platform: |
Size: 2048 |
Author: 唯唯王 |
Hits:
« 12
3
4
5
6
7
8
9
10
...
25
»