Crates.io | willowtree |
lib.rs | willowtree |
version | 0.2.0 |
source | src |
created_at | 2023-01-19 19:48:38.994982 |
updated_at | 2024-09-12 13:45:08.670725 |
description | Lazily evaluated trees |
homepage | https://github.com/lewis-carson/willowtree |
repository | https://github.com/lewis-carson/willowtree |
max_upload_size | |
id | 762878 |
size | 7,100 |
Sometimes, you need to traverse a tree so large that you can't afford to load it all into memory.
For example, you might have a tree of files on disk, and you want to traverse it, but you don't want to load all the files into memory. Or, you may want to write a game playing computer and want to abstract away move generation.
With willow
you could write search algorithm that assumes moves have already been generated.
This is a simple crate that allows you to do that. By implementing the Node
trait and creating a new Tree
, you can traverse in a lazy fashion.
The tree is based on an arena data structure, making it extremely efficient to traverse.
See the examples directory for more information.
My good thanks to arenatree
for providing the basis of this crate.