EGbbtree


Detailed Description

Here we define an implementation of bimary balanced trees. In this implementation the depth of the tree is bounded by 2*ceil(log_2(size)). Note that this structure don't support repeated elements.

-2005-09-09

-2005-09-08

-2004-08-16


Files

file  eg_bbtree.c
file  eg_bbtree.ex.c
file  eg_bbtree.h

Functions

int main (int argc, char **argv)
 Tester program for the projection structure and functions.
static int parseargs (int argc, char **argv, unsigned int *s, unsigned int *z)
 parse external arguments.
static void usage (char const *const program)
 usage function, if we give the wrong number of parameters, we return an error message and print a help.


Function Documentation

int main int  argc,
char **  argv
 

Tester program for the projection structure and functions.

Parameters:
argc int number of comand line options
argv char** array of strings of length argc contaianing the command line arguments.
Returns:
zero on success, non-zero otherwise
Description:
This function create a set of 'z' elements in a bbtree, and print the resulting tree, perform some random operations.
Examples:
eg_dmatrix.ex.c, eg_ebtree.ex.c, eg_edgraph.ex.c, eg_eheap.ex.c, eg_elist.ex.c, eg_eugraph.ex.c, eg_memslab.ex.c, eg_min_cut.ex.c, eg_net.ex.c, eg_push_relabel.ex.c, and eg_shrink_graph.ex.c.

Definition at line 102 of file eg_bbtree.ex.c.

Here is the call graph for this function:

static int parseargs int  argc,
char **  argv,
unsigned int *  s,
unsigned int *  z
[inline, static]
 

parse external arguments.

Parameters:
argc int, number of parameters to process.
argv char**, array of the parameters.
z unsigned int*, pointer to the number of elements in the tree.
s unsigned int*, pointer to the seed.
Returns:
zero on success, non-zero otherwise
Examples:
eg_net.ex.c.

Definition at line 59 of file eg_bbtree.ex.c.

Here is the call graph for this function:

static void usage char const *const   program  )  [inline, static]
 

usage function, if we give the wrong number of parameters, we return an error message and print a help.

Parameters:
program Name of the command from comand-line

Definition at line 41 of file eg_bbtree.ex.c.


Generated on Mon Jan 30 08:55:26 2006 for EGlib by  doxygen 1.4.5