Chimera: chimera_0-8/include/jrb.h File Reference

- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# jrb.h File Reference

`#include "jval.h"`

Go to the source code of this file.

## Classes
struct | jrb_node
## Defines
#define | jrb_first(n) (n->flink)
#define | jrb_last(n) (n->blink)
#define | jrb_next(n) (n->flink)
#define | jrb_prev(n) (n->blink)
#define | jrb_empty(t) (t->flink == t)
#define | jrb_nil(t) (t)
#define | jrb_traverse(ptr, lst) for(ptr = jrb_first(lst); ptr != jrb_nil(lst); ptr = jrb_next(ptr))
#define | jrb_rtraverse(ptr, lst) for(ptr = jrb_last(lst); ptr != jrb_nil(lst); ptr = jrb_prev(ptr))
## Typedefs
typedef jrb_node * | JRB
## Functions
JRB | make_jrb ()
JRB | jrb_insert_str (JRB tree, char *key, Jval val)
JRB | jrb_insert_int (JRB tree, int ikey, Jval val)
JRB | jrb_insert_dbl (JRB tree, double dkey, Jval val)
JRB | jrb_insert_gen (JRB tree, Jval key, Jval val, int(*func)(Jval, Jval))
JRB | jrb_find_str (JRB root, char *key)
JRB | jrb_find_int (JRB root, int ikey)
JRB | jrb_find_dbl (JRB root, double dkey)
JRB | jrb_find_gen (JRB root, Jval, int(*func)(Jval, Jval))
JRB | jrb_find_gte_str (JRB root, char *key, int *found)
JRB | jrb_find_gte_int (JRB root, int ikey, int *found)
JRB | jrb_find_gte_dbl (JRB root, double dkey, int *found)
JRB | jrb_find_gte_gen (JRB root, Jval key, int(*func)(Jval, Jval), int *found)
void | jrb_delete_node (JRB node)
void | jrb_free_tree (JRB root)
Jval | jrb_val (JRB node)
int | jrb_nblack (JRB n)
int | jrb_plength (JRB n)

## Define Documentation

#define jrb_empty | ( | t |  | ) | (t->flink == t)

#define jrb_first | ( | n |  | ) | (n->flink)

#define jrb_last | ( | n |  | ) | (n->blink)

#define jrb_next | ( | n |  | ) | (n->flink)

#define jrb_nil | ( | t |  | ) | (t)

#define jrb_prev | ( | n |  | ) | (n->blink)

#define jrb_rtraverse | ( | ptr,
|  | lst |  | ) | for(ptr = jrb_last(lst); ptr != jrb_nil(lst); ptr = jrb_prev(ptr))

#define jrb_traverse | ( | ptr,
|  | lst |  | ) | for(ptr = jrb_first(lst); ptr != jrb_nil(lst); ptr = jrb_next(ptr))

## Typedef Documentation

typedef struct jrb_node * JRB

## Function Documentation

void jrb_delete_node | ( | JRB | node | ) |

JRB jrb_find_dbl | ( | JRB | root,
|  | double | dkey
| ) |

JRB jrb_find_gen | ( | JRB | root,
|  | Jval | ,
|  | int(*)(Jval, Jval) | func
| ) |

JRB jrb_find_gte_dbl | ( | JRB | root,
|  | double | dkey,
|  | int * | found
| ) |

JRB jrb_find_gte_gen | ( | JRB | root,
|  | Jval | key,
|  | int(*)(Jval, Jval) | func,
|  | int * | found
| ) |

JRB jrb_find_gte_int | ( | JRB | root,
|  | int | ikey,
|  | int * | found
| ) |

JRB jrb_find_gte_str | ( | JRB | root,
|  | char * | key,
|  | int * | found
| ) |

JRB jrb_find_int | ( | JRB | root,
|  | int | ikey
| ) |

JRB jrb_find_str | ( | JRB | root,
|  | char * | key
| ) |

void jrb_free_tree | ( | JRB | root | ) |

JRB jrb_insert_dbl | ( | JRB | tree,
|  | double | dkey,
|  | Jval | val
| ) |

JRB jrb_insert_gen | ( | JRB | tree,
|  | Jval | key,
|  | Jval | val,
|  | int(*)(Jval, Jval) | func
| ) |

JRB jrb_insert_int | ( | JRB | tree,
|  | int | ikey,
|  | Jval | val
| ) |

JRB jrb_insert_str | ( | JRB | tree,
|  | char * | key,
|  | Jval | val
| ) |

int jrb_nblack | ( | JRB | n | ) |

int jrb_plength | ( | JRB | n | ) |

Jval jrb_val | ( | JRB | node | ) |

JRB make_jrb | ( |  | ) |