-
Notifications
You must be signed in to change notification settings - Fork 441
Closed
Description
Summary
Add methods to reserve, obtain, and shrink UnionFind capacity.
Motivation
As mentioned in proposal #729, some algorithms can dynamically generate new elements during execution. And in cases where a certain bound of their number may become known during execution, it would be nice to immediately reserve the necessary capacity to avoid unnecessary re-allocations.
Progress
-
UnionFind::capacity -
UnionFind::with_capacity() -
UnionFind::reserve -
UnionFind::reserve_exact -
UnionFind::try_reserve -
UnionFind::try_reserve_exact -
UnionFind::shrink_to_fit -
UnionFind::shrink_to
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels