enum lfds711_btree_au_absolute_position
Jump to navigation
Jump to search
Source File
└───liblfds711 └───inc └───liblfds711 lfds711_btree_addonly_unbalanced.h
Enum
enum lfds711_btree_au_absolute_position { LFDS711_BTREE_AU_ABSOLUTE_POSITION_ROOT, LFDS711_BTREE_AU_ABSOLUTE_POSITION_SMALLEST_IN_TREE, LFDS711_BTREE_AU_ABSOLUTE_POSITION_LARGEST_IN_TREE };
Values
LFDS711_BTREE_AU_ABSOLUTE_POSITION_ROOT
- Indicate the root element of the tree - the physical root, i.e. the first element linked into the tree. The root element has no particular or noteworthy logical value.
LFDS711_BTREE_AU_ABSOLUTE_POSITION_SMALLEST_IN_TREE
- Indicates the smallest element of tree (the leftmost element from the root).
LFDS711_BTREE_AU_ABSOLUTE_POSITION_LARGEST_IN_TREE
- Indicates the largest element of tree (the rightmost element from the root).
Notes
Used by lfds711_btree_au_get_by_absolute_position and lfds711_btree_au_get_by_absolute_position_and_then_by_relative_position to select an element from a btree.
An inorder walk, from smallest to largest, is performed by getting LFDS711_BTREE_AU_ABSOLUTE_POSITION_SMALLEST_IN_TREE and then repeatedly following the direction LFDS711_BTREE_AU_RELATIVE_POSITION_NEXT_LARGER_ELEMENT_IN_ENTIRE_TREE. (Flip the SMALLEST and LARGEST to walk from largest to smallest.)