# Functions
BinarySearch searches for target in a sorted slice s.
GetLargestNItems get N highest priority items.
GetSmallestNItems get N smallest priority items.
GetTopKItems calculate topN by heap.
NewDeque new deque.
NewFIFO create a new FIFO queue.
NewPriorityQ create new PriorityQ
Args: - order: common.SortOrderAsc or common.SortOrderDesc, if you want to get topN items, use common.SortOrderDesc, if you want to get bottomN items, use common.SortOrderAsc.
NewSkiplist new skiplist
https://github.com/sean-public/fast-skiplist.
WithDequeCurrentCapacity preallocate memory for deque.
WithDequeMinimalCapacity set deque minimal capacity.
# Structs
FIFO is a lock-free First-In-First-Out queue
paper: https://1drv.ms/b/s!Au45o0W1gVVLuNxYkPzfBo4fOssFPQ?e=TYxHKl.
PriorityItem priority item.
PriorityQ priority queue
Do not use this structure directly, use `NewPriorityQ` instead.
SkipList skiplist.
# Interfaces
Deque
https://pkg.go.dev/github.com/gammazero/deque#Deque.
PriotiryItemItf priority item interface.
# Type aliases
DequeOptFunc optional arguments for deque.