ZEDA  1.6.18
Macros
zeda_tree.h File Reference

tree operation. More...

#include <zeda/zeda_misc.h>
Include dependency graph for zeda_tree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define zTreeClass(node_t, data_t)
 generate binary tree class. More...
 
#define zTreeClassMethod(node_t, data_t, init, destroy)
 
#define zHeapClass(node_t, data_t)
 
#define zHeapClassMethod(node_t, data_t, init, destroy)
 
#define zTreeIsEmpty(t)   ( (t)->size == 0 )
 
#define zTreeIsLeaf(t)   ( !(t)->child[0] && !(t)->child[1] )
 
#define _zTreeParentID(n)   ( (n)->parent->child[0] == (n) ? 0 : ( (n)->parent->child[1] == (n) ? 1 : -1 ) )
 
#define _zTreeInitHeapMask(t, mask)
 
#define zTreeInit(node_t, node)   node_t##Init( node )
 
#define zTreeDestroy(node_t, tree)   node_t##Destroy( tree )
 
#define zTreeNodeAlloc(node_t, val)   node_t##NodeAlloc( val )
 
#define zTreeAddComplete(node_t, tree, val)   node_t##AddComplete( tree, val )
 
#define zTreeUpHeap(node_t, tree, node, cmp, util)   node_t##UpHeap( tree, node, cmp, util )
 
#define zTreeAddHeap(node_t, tree, val, cmp, util)   node_t##AddHeap( tree, val, cmp, util )
 
#define zTreeDownHeap(node_t, node, cmp, util)   node_t##DownHeap( node, cmp, util )
 
#define zTreeDeleteHeap(node_t, tree, cmp, util)   node_t##DeleteHeap( tree, cmp, util )
 
#define zTreeHeapify(node_t, tree, cmp, util)   node_t##Heapify( tree, cmp, util )
 

Detailed Description

tree operation.

Author
Zhidao