algorithm 0.1.18

about algorithm data structure, now has ttl with lru/lru-k/lfu/arc and slab/rbtree/roaring_bitmap/timer_wheelss, 关于算法常用的数据结构
Documentation
1
2
3
4
5
6
7
8
9
use algorithm::RoaringBitMap;
fn main() {
    let mut map = RoaringBitMap::new();
    map.add_range(9, 16);
    let mut sub_map = RoaringBitMap::new();
    sub_map.add_range(7, 12);
    let map = map.union(&sub_map);
    assert!(map.iter().collect::<Vec<_>>() == vec![7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
}