bitmap

package
v2.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

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

func (bitmap *Bitmap) Clone() *Bitmap

Clone returns a copy of the bitmap @return *Bitmap

func (*Bitmap) Has

func (bitmap *Bitmap) Has(num int) bool

Has returns true if the num bit is 1 @param num @return bool

func (*Bitmap) InterExist

func (bitmap *Bitmap) InterExist(bitmap2 *Bitmap) bool

InterExist returns true if the intersection of two bitmaps is not empty @param bitmap2 @return bool

func (*Bitmap) Or

func (bitmap *Bitmap) Or(bitmap2 *Bitmap)

Or returns the union of two bitmaps @param bitmap2

func (*Bitmap) Pos1

func (bitmap *Bitmap) Pos1() []int

所有为1的Pos

func (*Bitmap) Set

func (bitmap *Bitmap) Set(num int) *Bitmap

Set sets the num bit to 1 @param num @return *Bitmap

func (*Bitmap) String

func (bitmap *Bitmap) String() string

String returns the string representation of the bitmap @return string

func (*Bitmap) Xor

func (bitmap *Bitmap) Xor(bitmap2 *Bitmap)

Xor returns the xor of two bitmaps @param bitmap2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL