Documentation ¶
Index ¶
- type Bitmap
- func (bitmap *Bitmap) Clone() *Bitmap
- func (bitmap *Bitmap) Has(num int) bool
- func (bitmap *Bitmap) InterExist(bitmap2 *Bitmap) bool
- func (bitmap *Bitmap) Or(bitmap2 *Bitmap)
- func (bitmap *Bitmap) Pos1() []int
- func (bitmap *Bitmap) Set(num int) *Bitmap
- func (bitmap *Bitmap) String() string
- func (bitmap *Bitmap) Xor(bitmap2 *Bitmap)
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
}
Bitmap is a bitmap implementation
func (*Bitmap) Clone ¶
Clone returns a copy of the bitmap @return *Bitmap
func (*Bitmap) Has ¶
Has returns true if the num bit is 1 @param num @return bool
func (*Bitmap) InterExist ¶
InterExist returns true if the intersection of two bitmaps is not empty @param bitmap2 @return bool
func (*Bitmap) Or ¶
Or returns the union of two bitmaps @param bitmap2
func (*Bitmap) Set ¶
Set sets the num bit to 1 @param num @return *Bitmap
func (*Bitmap) String ¶
String returns the string representation of the bitmap @return string
Click to show internal directories.
Click to hide internal directories.