jogru0 / disjoint

Fast and safe implementation of the disjoint-set data structure.
https://docs.rs/disjoint/latest/disjoint/index.html
Apache License 2.0
2 stars 2 forks source link

Add a `clear` function to `DisjointSet` and `DisjointSetVec`. #9

Closed andriyDev closed 4 months ago

andriyDev commented 4 months ago

This allows emptying these containers without removing their capacity. This is useful if you are emptying it and then about to refill it with similarly-sized data.

jogru0 commented 4 months ago

Thank you, that is a nice addition, I just released it as part of version 0.8.0 :)