Sensix
Wireless Sensor Network Middleware



   Home


   Project Page


   Download


   CVS




 Hosted by
Get SENSIX at SourceForge.net. Fast, secure 
and Free Open Source software downloads

/home/brennan/Software/sensix/source/avl.c File Reference

An AVL tree implementation. More...

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <syslog.h>
#include "avl.h"

Go to the source code of this file.

Classes

struct  avlnode

Defines

#define avl_malloc(size)   malloc(size)
#define avl_free(ptr)   free(ptr)
#define avl_error(...)   syslog(LOG_ERR, __VA_ARGS__)
#define avl_log(...)   syslog(LOG_INFO, __VA_ARGS__)
#define return_errno(num)   do { errno = num; return -1; } while (0)

Enumerations

enum  { LEFT = 0, RIGHT = 1 }

Functions

unsigned long avl_size (struct avltree *tree)
void * avl_find (unsigned long key, struct avltree *tree)
void * avl_find_min (struct avltree *tree)
struct avlnode__find_max_node (struct avltree *tree)
void * avl_find_max (struct avltree *tree)
int avl_insert (void *elt, unsigned long key, struct avltree *tree)
int avl_delete (void *elt, unsigned long key, struct avltree *tree)
void destroy_avltree (struct avltree *tree)
void avl_print (struct avltree *tree)
void avl_print_list (struct avltree *tree)


Detailed Description

An AVL tree implementation.

Revision
1.1

Original Author: Sean M. Brennan <brennan@lanl.gov>

Author
sean_m_brennan

Created: February 8, 2006

Date
2009/07/04 03:59:32

Definition in file avl.c.


Define Documentation

#define avl_error ( ...   )     syslog(LOG_ERR, __VA_ARGS__)

Definition at line 57 of file avl.c.

#define avl_free ( ptr   )     free(ptr)

Definition at line 56 of file avl.c.

#define avl_log ( ...   )     syslog(LOG_INFO, __VA_ARGS__)

Definition at line 58 of file avl.c.

#define avl_malloc ( size   )     malloc(size)

Definition at line 55 of file avl.c.

#define return_errno ( num   )     do { errno = num; return -1; } while (0)

Definition at line 59 of file avl.c.


Enumeration Type Documentation

anonymous enum

Enumerator:
LEFT 
RIGHT 

Definition at line 75 of file avl.c.


Function Documentation

struct avlnode* __find_max_node ( struct avltree tree  )  [read]

Definition at line 221 of file avl.c.

int avl_delete ( void *  elt,
unsigned long  key,
struct avltree tree 
)

Definition at line 371 of file avl.c.

void* avl_find ( unsigned long  key,
struct avltree tree 
)

Definition at line 200 of file avl.c.

void* avl_find_max ( struct avltree tree  ) 

Definition at line 239 of file avl.c.

void* avl_find_min ( struct avltree tree  ) 

Definition at line 210 of file avl.c.

int avl_insert ( void *  elt,
unsigned long  key,
struct avltree tree 
)

Definition at line 310 of file avl.c.

void avl_print ( struct avltree tree  ) 

Definition at line 424 of file avl.c.

void avl_print_list ( struct avltree tree  ) 

Definition at line 434 of file avl.c.

unsigned long avl_size ( struct avltree tree  ) 

Definition at line 166 of file avl.c.

void destroy_avltree ( struct avltree tree  ) 

Definition at line 393 of file avl.c.


© 2008, Los Alamos National Security, LLC.