aph_disjoint_set 0.1.1

Disjoint set implementation with optimized memory usage and ability to detach elements.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This is space optimization.
// Makes disjoint set occupy less memory
// if size smaller by lowering sizes of roots and
// ranks.
#[derive(Clone, Copy)]
pub(crate) enum BitsEnum<
    Tu8,
    Tu16,
    #[cfg(any(target_pointer_width = "32", target_pointer_width = "64"))] Tu32,
    #[cfg(target_pointer_width = "64")] Tu64,
> {
    U8(Tu8),
    U16(Tu16),
    #[cfg(any(target_pointer_width = "32", target_pointer_width = "64"))]
    U32(Tu32),
    #[cfg(target_pointer_width = "64")]
    U64(Tu64),
}