ewah

package
v0.0.0-...-15ee236 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2013 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunningLengthBits                   int32  = 32
	LiteralBits                         int32  = 64 - 1 - RunningLengthBits
	LargestLiteralCount                 uint64 = (uint64(1) << uint32(LiteralBits)) - 1
	LargestRunningLengthCount           uint64 = (uint64(1) << uint32(RunningLengthBits)) - 1
	RunningLengthPlusRunningBit         uint64 = (uint64(1) << uint32(RunningLengthBits+1)) - 1
	ShiftedLargestRunningLengthCount    uint64 = LargestRunningLengthCount << 1
	NotRunningLengthPlusRunningBit      uint64 = ^RunningLengthPlusRunningBit
	NotShiftedLargestRunningLengthCount uint64 = ^ShiftedLargestRunningLengthCount
)

Variables

This section is empty.

Functions

func New

func New() bitmap.Bitmap

Types

type BitmapStorage

type BitmapStorage interface {
	// contains filtered or unexported methods
}

type Ewah

type Ewah struct {
	// contains filtered or unexported fields
}

func (*Ewah) And

func (this *Ewah) And(a ...bitmap.Bitmap) bitmap.Bitmap

func (*Ewah) AndNot

func (this *Ewah) AndNot(a ...bitmap.Bitmap) bitmap.Bitmap

func (*Ewah) Cardinality

func (this *Ewah) Cardinality() int64

func (*Ewah) Clear

func (this *Ewah) Clear()

func (*Ewah) Clone

func (this *Ewah) Clone() bitmap.Bitmap

func (*Ewah) Copy

func (this *Ewah) Copy(other bitmap.Bitmap) bitmap.Bitmap

func (*Ewah) Equal

func (this *Ewah) Equal(other bitmap.Bitmap) bool

func (*Ewah) Get

func (this *Ewah) Get(i int64) bool

func (*Ewah) Not

func (this *Ewah) Not() bitmap.Bitmap

func (*Ewah) Or

func (this *Ewah) Or(a ...bitmap.Bitmap) bitmap.Bitmap

func (*Ewah) PrintStats

func (this *Ewah) PrintStats(details bool)

func (*Ewah) Reset

func (this *Ewah) Reset()

func (*Ewah) Set

func (this *Ewah) Set(i int64) bitmap.Bitmap

Set sets the bit at position i to true (1). The bits must be set in ascending order. For example, set(15) then set(7) will fail.

func (*Ewah) Size

func (this *Ewah) Size() int64

Returns the size in bits of the *uncompressed* bitmap represented by this compressed bitmap. Initially, the sizeInBits is zero. It is extended automatically when you set bits to true.

func (*Ewah) SizeInBytes

func (this *Ewah) SizeInBytes() int64

Report the *compressed* size of the bitmap (equivalent to memory usage, after accounting for some overhead).

func (*Ewah) SizeInWords

func (this *Ewah) SizeInWords() int64

func (*Ewah) Swap

func (this *Ewah) Swap(other *Ewah) bitmap.Bitmap

func (*Ewah) Xor

func (this *Ewah) Xor(a ...bitmap.Bitmap) bitmap.Bitmap

Jump to

Keyboard shortcuts

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