Skip to content

Alucardmini/basic_algrithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pybitmap

安装:

pip3 install pybitmap

使用方法:

bit_map = Pybitmap(1000000) # 1000000为指定size 表示存储最大的元素

操作

bit_map.add(32)  # 添加元素
bit_map.remove(32)  # 删除元素
print(list(bit_map.sequence(reverse=False)))  # 按序列输出元素, reverse 是否逆序

#查找元素
print(bit_map.query_value(43))
返回: (False, 0, 43)
False 表示不存在  (True 表示存在)
0     表示应该存在的整型数字的序列
43    整型数字中的位数

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages