Documentation
¶
Index ¶
- type BTreemap
- func (tm *BTreemap) Add(value uint64)
- func (tm *BTreemap) AddInt(value int)
- func (tm *BTreemap) AddMany(values []uint64)
- func (tm *BTreemap) AddRange(rangeStart, rangeEnd uint64)
- func (tm *BTreemap) And(other *BTreemap)
- func (tm *BTreemap) AndCardinality(other *BTreemap) uint64
- func (tm *BTreemap) AndNot(other *BTreemap)
- func (tm *BTreemap) CheckedAdd(value uint64) bool
- func (tm *BTreemap) CheckedRemove(value uint64) bool
- func (tm *BTreemap) Clear()
- func (tm *BTreemap) Clone() *BTreemap
- func (tm *BTreemap) Contains(value uint64) bool
- func (tm *BTreemap) ContainsInt(x int) bool
- func (tm *BTreemap) Equals(o interface{}) bool
- func (tm *BTreemap) Flip(rangeStart, rangeEnd uint64)
- func (tm *BTreemap) FlipInt(rangeStart, rangeEnd int)
- func (tm *BTreemap) FromBase64(str string) (int64, error)
- func (tm *BTreemap) FromBuffer(buf []byte) (p int64, err error)
- func (tm *BTreemap) GetCardinality() uint64
- func (tm *BTreemap) GetSerializedSizeInBytes() uint64
- func (tm *BTreemap) GetSizeInBytes() uint64
- func (tm *BTreemap) Intersects(other *BTreemap) bool
- func (tm *BTreemap) IsEmpty() bool
- func (tm *BTreemap) Iterate(cb func(x uint64) bool)
- func (tm *BTreemap) Iterator() IntPeekable
- func (tm *BTreemap) ManyIterator() ManyIntIterable
- func (tm *BTreemap) MarshalBinary() ([]byte, error)
- func (tm *BTreemap) Maximum() uint64
- func (tm *BTreemap) Minimum() uint64
- func (tm *BTreemap) Or(other *BTreemap)
- func (tm *BTreemap) OrCardinality(other *BTreemap) uint64
- func (tm *BTreemap) Rank(value uint64) uint64
- func (tm *BTreemap) ReadFrom(reader io.Reader) (p int64, err error)
- func (tm *BTreemap) Remove(value uint64)
- func (tm *BTreemap) RemoveRange(rangeStart, rangeEnd uint64)
- func (tm *BTreemap) ReverseIterator() IntIterable
- func (tm *BTreemap) RunOptimize()
- func (tm *BTreemap) Select(value uint64) (uint64, error)
- func (tm *BTreemap) Stats() (stats roaring.Statistics)
- func (tm *BTreemap) String() string
- func (tm *BTreemap) ToArray() []uint64
- func (tm *BTreemap) ToBase64() (string, error)
- func (tm *BTreemap) ToBytes() ([]byte, error)
- func (tm *BTreemap) UnmarshalBinary(data []byte) error
- func (tm *BTreemap) WithCppSerializer() *BTreemap
- func (tm *BTreemap) WithJvmSerializer() *BTreemap
- func (tm *BTreemap) WriteTo(stream io.Writer) (int64, error)
- func (tm *BTreemap) Xor(other *BTreemap)
- type Bitmap64
- type IntIterable
- type IntPeekable
- type ManyIntIterable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BTreemap ¶
type BTreemap struct {
// contains filtered or unexported fields
}
func FastAnd ¶
FastAnd computes the intersection between many bitmaps quickly Compared to the And function, it can take many bitmaps as input, thus saving the trouble of manually calling "And" many times.
func FastOr ¶
FastOr computes the union between many bitmaps quickly, as opposed to having to call Or repeatedly. It might also be faster than calling Or repeatedly.
func FastXor ¶
FastXor computes the symmetric difference between many bitmaps quickly, as opposed to having to call Or repeatedly. It might also be faster than calling Xor repeatedly.
func HeapOr ¶
HeapOr computes the union between many bitmaps quickly using a heap. It might be faster than calling Or repeatedly.
func HeapXor ¶
HeapXor computes the symmetric difference between many bitmaps quickly (as opposed to calling Xor repeated). Internally, this function uses a heap. It might be faster than calling Xor repeatedly.
func (*BTreemap) AndCardinality ¶
func (*BTreemap) CheckedAdd ¶
func (*BTreemap) CheckedRemove ¶
func (*BTreemap) ContainsInt ¶
func (*BTreemap) GetCardinality ¶
func (*BTreemap) GetSerializedSizeInBytes ¶
func (*BTreemap) GetSizeInBytes ¶
func (*BTreemap) Intersects ¶
func (*BTreemap) Iterator ¶
func (tm *BTreemap) Iterator() IntPeekable
func (*BTreemap) ManyIterator ¶
func (tm *BTreemap) ManyIterator() ManyIntIterable
func (*BTreemap) MarshalBinary ¶
func (*BTreemap) OrCardinality ¶
func (*BTreemap) RemoveRange ¶
func (*BTreemap) ReverseIterator ¶
func (tm *BTreemap) ReverseIterator() IntIterable
func (*BTreemap) RunOptimize ¶
func (tm *BTreemap) RunOptimize()
func (*BTreemap) Stats ¶
func (tm *BTreemap) Stats() (stats roaring.Statistics)
func (*BTreemap) UnmarshalBinary ¶
func (*BTreemap) WithCppSerializer ¶
serializer that is compatible with C++ version found in CRoaring at https://github.com/RoaringBitmap/CRoaring/blob/master/cpp/roaring64map.hh
func (*BTreemap) WithJvmSerializer ¶
serializer that is compatible with JVM version of Treemap found in RoaringBitmap Java implementation at: https://github.com/RoaringBitmap/RoaringBitmap/blob/master/roaringbitmap/src/main/java/org/roaringbitmap/longlong/Roaring64NavigableMap.java
type Bitmap64 ¶
type Bitmap64 interface {
ToBase64() (string, error)
FromBase64(str string) (int64, error)
WriteTo(stream io.Writer) (int64, error)
ToBytes() ([]byte, error)
ReadFrom(reader io.Reader) (p int64, err error)
FromBuffer(buf []byte) (p int64, err error)
RunOptimize()
MarshalBinary() ([]byte, error)
UnmarshalBinary(data []byte) error
Clear()
ToArray() []uint64
GetSizeInBytes() uint64
GetSerializedSizeInBytes() uint64
String() string
Iterate(cb func(x uint64) bool)
Iterator() IntPeekable
ReverseIterator() IntIterable
ManyIterator() ManyIntIterable
Clone() *BTreemap
Minimum() uint64
Maximum() uint64
Contains(x uint64) bool
ContainsInt(x int) bool
Equals(o interface{}) bool
Add(x uint64)
CheckedAdd(x uint64) bool
AddInt(x int)
Remove(x uint64)
CheckedRemove(x uint64) bool
IsEmpty() bool
GetCardinality() uint64
And(other *BTreemap)
OrCardinality(other *BTreemap) uint64
AndCardinality(other *BTreemap) uint64
Intersects(other *BTreemap) bool
Xor(other *BTreemap)
Or(other *BTreemap)
AndNot(other *BTreemap)
AddMany(dat []uint64)
Rank(x uint64) uint64
Select(x uint64) (uint64, error)
Flip(rangeStart, rangeEnd uint64)
FlipInt(rangeStart, rangeEnd int)
AddRange(rangeStart, rangeEnd uint64)
RemoveRange(rangeStart, rangeEnd uint64)
Stats() roaring.Statistics
}
type IntIterable ¶
IntIterable allows you to iterate over the values in a Bitmap
type IntPeekable ¶
type IntPeekable interface {
IntIterable
// PeekNext peeks the next value without advancing the iterator
PeekNext() uint64
// AdvanceIfNeeded advances as long as the next value is smaller than minval
AdvanceIfNeeded(minval uint64)
}
IntPeekable allows you to look at the next value without advancing and advance as long as the next value is smaller than minval
type ManyIntIterable ¶
type ManyIntIterable interface {
// pass in a buffer to fill up with values, returns how many values were returned
NextMany([]uint64) int
}
ManyIntIterable allows you to iterate over the values in a Bitmap
