Documentation
¶
Index ¶
- type Bitmap
- func (b *Bitmap) And(other *Bitmap)
- func (b *Bitmap) AndNot(other *Bitmap)
- func (b *Bitmap) Clear(bit uint64) bool
- func (b *Bitmap) Clone() *Bitmap
- func (b *Bitmap) Contains(bit uint64) bool
- func (b *Bitmap) Count() uint64
- func (b *Bitmap) Or(other *Bitmap)
- func (b *Bitmap) Range(yield func(bit uint64) bool)
- func (b *Bitmap) Set(bit uint64) bool
- func (b *Bitmap) Snapshot() []uint64
- func (b *Bitmap) SnapshotWithin(bitCount uint64) ([]uint64, bool)
- type Heap
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 growable, concurrent-safe compressed bitmap.
func NewBitmap ¶
NewBitmap returns a bitmap with a logical capacity for bitCount bits. All bits are initially clear. Storage remains sparse until bits are set.
func (*Bitmap) Range ¶
Range calls yield for set bits in ascending order and stops when yield returns false. The callback runs against a snapshot and may mutate b.
type Heap ¶
type Heap[T any] struct { // contains filtered or unexported fields }
Heap is a binary heap ordered by less. If less(a, b) is true, a is nearer the root than b. Heap is not safe for concurrent mutation.
func NewHeapWithCapacity ¶
NewHeapWithCapacity constructs an empty heap with storage reserved for at least capacity values. It panics when capacity is negative or less is nil.
Click to show internal directories.
Click to hide internal directories.