BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

rbtree.h File Reference

Red/Black Tree. More...

Go to the source code of this file.

Data Structures

struct  pj_rbtree_node
struct  pj_rbtree

Macros

#define PJ_RBTREE_NODE_SIZE   (sizeof(pj_rbtree_node))
#define PJ_RBTREE_SIZE   (sizeof(pj_rbtree))

Typedefs

typedef int pj_rbtree_comp (const void *key1, const void *key2)

Enumerations

enum  pj_rbcolor_t { PJ_RBCOLOR_BLACK, PJ_RBCOLOR_RED }

Functions

void pj_rbtree_init (pj_rbtree *tree, pj_rbtree_comp *comp)
pj_rbtree_nodepj_rbtree_first (pj_rbtree *tree)
pj_rbtree_nodepj_rbtree_last (pj_rbtree *tree)
pj_rbtree_nodepj_rbtree_next (pj_rbtree *tree, pj_rbtree_node *node)
pj_rbtree_nodepj_rbtree_prev (pj_rbtree *tree, pj_rbtree_node *node)
int pj_rbtree_insert (pj_rbtree *tree, pj_rbtree_node *node)
pj_rbtree_nodepj_rbtree_find (pj_rbtree *tree, const void *key)
pj_rbtree_nodepj_rbtree_erase (pj_rbtree *tree, pj_rbtree_node *node)
unsigned pj_rbtree_max_height (pj_rbtree *tree, pj_rbtree_node *node)
unsigned pj_rbtree_min_height (pj_rbtree *tree, pj_rbtree_node *node)

Detailed Description

Red/Black Tree.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.