Documentation ¶
Overview ¶
Package algo contains algorithms such as merging, intersecting sorted lists.
Index ¶
- func ApplyFilter(u *intern.List, f func(uint64, int) bool)
- func Difference(u, v *intern.List) *intern.List
- func IndexOf(u *intern.List, uid uint64) int
- func IntersectCompressedWith(u []byte, afterUID uint64, v, o *intern.List)
- func IntersectCompressedWithBin(bi *bp128.BPackIterator, q []uint64, o *[]uint64)
- func IntersectCompressedWithLinJump(bi *bp128.BPackIterator, v []uint64, o *[]uint64)
- func IntersectSorted(lists []*intern.List) *intern.List
- func IntersectWith(u, v, o *intern.List)
- func IntersectWithBin(d, q []uint64, o *[]uint64)
- func IntersectWithJump(u, v []uint64, o *[]uint64) (int, int)
- func IntersectWithLin(u, v []uint64, o *[]uint64) (int, int)
- func MergeSorted(lists []*intern.List) *intern.List
- func ToUintsListForTest(ul []*intern.List) [][]uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFilter ¶
ApplyFilter applies a filter to our UIDList.
func IndexOf ¶
IndexOf performs a binary search on the uids slice and returns the index at which it finds the uid, else returns -1
func IntersectCompressedWith ¶ added in v0.8.2
func IntersectCompressedWithBin ¶ added in v0.8.2
func IntersectCompressedWithBin(bi *bp128.BPackIterator, q []uint64, o *[]uint64)
IntersectWithBin is based on the paper "Fast Intersection Algorithms for Sorted Sequences" https://link.springer.com/chapter/10.1007/978-3-642-12476-1_3
func IntersectCompressedWithLinJump ¶ added in v0.8.2
func IntersectCompressedWithLinJump(bi *bp128.BPackIterator, v []uint64, o *[]uint64)
func IntersectWith ¶
IntersectWith intersects u with v. The update is made to o. u, v should be sorted.
func IntersectWithBin ¶ added in v0.8.2
IntersectWithBin is based on the paper "Fast Intersection Algorithms for Sorted Sequences" https://link.springer.com/chapter/10.1007/978-3-642-12476-1_3
func IntersectWithJump ¶ added in v0.8.2
func IntersectWithLin ¶ added in v0.8.2
func MergeSorted ¶
MergeSorted merges sorted lists.
func ToUintsListForTest ¶
ToUintsListForTest converts to list of uints for testing purpose only.
Types ¶
This section is empty.