README ¶ bitmap 介绍 BitMap 的基本原理就是用一个bit 位来存放某种状态,适用于大规模数据,但数据状态又不是很多的情况。通常是用来判断某个数据存不存在的。 安装教程 go get github.com/jageros/hawox 使用例子 package main import ( "fmt" "github.com/jageros/hawox/xxx" ) func main() { /* xxxxx xxxxx xxxxx */ } 使用说明 xxxx xxxx xxxx Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Bitmap func New() *Bitmap func (bm *Bitmap) Add(num int) func (bm *Bitmap) Clear() func (bm *Bitmap) Has(num int) bool func (bm *Bitmap) Len() int Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Bitmap ¶ type Bitmap struct { // contains filtered or unexported fields } func New ¶ func New() *Bitmap func (*Bitmap) Add ¶ func (bm *Bitmap) Add(num int) func (*Bitmap) Clear ¶ func (bm *Bitmap) Clear() func (*Bitmap) Has ¶ func (bm *Bitmap) Has(num int) bool func (*Bitmap) Len ¶ func (bm *Bitmap) Len() int Source Files ¶ View all Source files bitmap.go Click to show internal directories. Click to hide internal directories.