dynforest

Crates.iodynforest
lib.rsdynforest
version0.2.0
sourcesrc
created_at2023-04-09 04:01:29.862102
updated_at2023-04-10 20:23:58.003232
descriptiondynamic forest management
homepagehttps://github.com/schrodingerzhu/dynforest
repositoryhttps://github.com/schrodingerzhu/dynforest
max_upload_size
id833928
size33,070
Schrodinger ZHU Yifan (SchrodingerZhu)

documentation

README

dynforest

This crate provides a data structure to handle dynamic tree connectivity. Both incremental and decremental operations are supported with amortized O(log n) time complexity.

As the underlying data structure is a Splay tree, this crate works best with the situation where the working set is relatively small.

To represent a node in the forest, one can create a handle via [Handle::new]. To connect two nodes, one can use [Handle::connect]. This will return a [Connection], which will keep the two nodes connected until it is dropped.

Commit count: 11

cargo fmt