Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RangeIndex ¶
type RangeIndex struct {
// contains filtered or unexported fields
}
RangeIndex stores entries as: high 32 bits: location low 32 bits: value
func NewRangeIndex ¶
func NewRangeIndex() *RangeIndex
NewRangeIndex retrieves an object from the pool and resets it.
func (*RangeIndex) Add ¶
func (ri *RangeIndex) Add(loc, value uint32)
Add inserts a (loc, value) pair. loc and value are both uint32.
func (*RangeIndex) Query ¶
func (ri *RangeIndex) Query(left, right uint32) []uint64
Query returns all entries whose loc is within the given range. Attention: the length of result might be 0. Note that: each returned slice element contain both location and value. You can get the location by v >> 32, and value v & 4294967295
func (*RangeIndex) Release ¶
func (ri *RangeIndex) Release()
Release returns the object back to the pool. Large backing arrays are dropped to avoid memory bloat.
Click to show internal directories.
Click to hide internal directories.