2023-01-28 19:27:40 +01:00
|
|
|
#include "vieter_tree.h"
|
2023-02-02 14:10:35 +01:00
|
|
|
#include "vieter_tree_node.h"
|
2023-01-28 19:27:40 +01:00
|
|
|
|
2023-01-29 17:32:27 +01:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2023-02-02 14:10:35 +01:00
|
|
|
struct vieter_tree {
|
|
|
|
uint64_t size;
|
|
|
|
vieter_tree_node *root;
|
|
|
|
};
|
|
|
|
|
2023-01-28 19:27:40 +01:00
|
|
|
/*
|
|
|
|
* Inspect whether the tree is still a valid red-black-tree.
|
|
|
|
*
|
2023-01-29 17:32:27 +01:00
|
|
|
* @return true if valid, false otherwise.
|
2023-01-28 19:27:40 +01:00
|
|
|
*/
|
2023-01-29 17:32:27 +01:00
|
|
|
bool vieter_tree_validate(vieter_tree *tree);
|
2023-02-02 14:10:35 +01:00
|
|
|
|
|
|
|
struct vieter_tree_iterator {
|
|
|
|
vieter_tree_node *current_node;
|
|
|
|
bool started;
|
|
|
|
bool done;
|
|
|
|
};
|