Documentation
¶
Overview ¶
Index ¶
Constants ¶
View Source
const PRI_INVALID int64 = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
An Item is something we manage in a priority queue.
type PriorityQueue ¶
type PriorityQueue struct {
// contains filtered or unexported fields
}
A PriorityQueue implements heap.Interface and holds Items.
func NewPriorityQueue ¶
func NewPriorityQueue() *PriorityQueue
func (*PriorityQueue) Peak ¶
func (pq *PriorityQueue) Peak() interface{}
func (*PriorityQueue) PeakPriority ¶
func (pq *PriorityQueue) PeakPriority() int64
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(value interface{}, priority int64)
Click to show internal directories.
Click to hide internal directories.