Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPriorityQueueSize = 10000
DefaultPriorityQueueSize max priority queue size
View Source
const SortedSetKey = "location-ranking"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
InMemory defines an inMemory ranking in top of a priority queue over the heap
func (*InMemory) IncreaseScore ¶
IncreaseScore city score increase by 1
type PriorityQueue ¶
A PriorityQueue implements heap.Interface and holds Locations.
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
Less comparative method between locations
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
Pop remove and returns last element on priority queue
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x interface{})
Push inserts a location in the top of the priority queue
Click to show internal directories.
Click to hide internal directories.