Lines Matching refs:node
55 * insert 1 node constant O(log(n))
57 * delete 1 node constant between constant and O(log(n))
62 * or prev node constant between constant and O(log(n))
81 * avl_first() - returns the lowest valued node
82 * avl_last() - returns the highest valued node
83 * AVL_NEXT() - given a node go to next higher one
84 * AVL_PREV() - given a node go to previous lower one
86 * 2c. Find the node with the closest value either less than or greater
115 * An opaque type used to locate a position in the tree where a node
156 * Find a node with a matching value in the tree. Returns the matching node
160 * node - node that has the value being looked for
163 extern void *avl_find(avl_tree_t *tree, const void *node, avl_index_t *where);
166 * Insert a node into the tree.
168 * node - the node to insert
171 extern void avl_insert(avl_tree_t *tree, void *node, avl_index_t where);
181 * here - existing node in "tree"
189 * Return the first or last valued node in the tree. Will return NULL
198 * Return the next or previous valued node in the tree.
199 * AVL_NEXT() will return NULL if at the last node.
200 * AVL_PREV() will return NULL if at the first node.
202 * node - the node from which the next or previous node is found
204 #define AVL_NEXT(tree, node) avl_walk(tree, node, AVL_AFTER)
205 #define AVL_PREV(tree, node) avl_walk(tree, node, AVL_BEFORE)
209 * Find the node with the nearest value either greater or less than
210 * the value from a previous avl_find(). Returns the node or NULL if
216 * EXAMPLE get the greatest node that is less than a given value:
220 * struct my_data *node;
224 * node = avl_find(tree, &look_for_value, &where);
225 * if (node != NULL)
226 * less = AVL_PREV(tree, node);
234 * Add a single node to the tree.
235 * The node must not be in the tree, and it must not
236 * compare equal to any other node already in the tree.
238 * node - the node to add
240 extern void avl_add(avl_tree_t *tree, void *node);
244 * Remove a single node from the tree. The node must be in the tree.
246 * node - the node to remove
248 extern void avl_remove(avl_tree_t *tree, void *node);
251 * Reinsert a node only if its order has changed relative to its nearest
253 * node and avl_update_gt() checks only the next node. Use avl_update_lt() and
255 * node may change.
278 * be initialized to NULL before the first call. Returns a node that has been
289 * struct my_data *node;
293 * while ((node = avl_destroy_nodes(tree, &cookie)) != NULL)
294 * free(node);