Crates.io | apter |
lib.rs | apter |
version | 0.1.0 |
source | src |
created_at | 2023-12-26 08:48:54.802449 |
updated_at | 2023-12-26 08:48:54.802449 |
description | Apter Trees in Rust |
homepage | |
repository | |
max_upload_size | |
id | 1080779 |
size | 5,540 |
Apter Trees are a simple tree representation using two vectors, node_values
and parent_indices
.
This library provides a generic ApterTree<T>
type and implements a number of
useful functions.
use apter::ApterTree;
fn main() {
let mut tree = ApterTree::new();
tree.insert("root", usize::MAX);
tree.insert("a", 0);
tree.insert("b", 0);
assert_eq!(tree.len(), 3);
}