Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comparable ¶
func Comparable(i interface{}) bool
func FirstNotEmpty ¶
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
}
PriorityQueue wrapper
func NewPQ ¶
func NewPQ() *PriorityQueue
func (*PriorityQueue) Len ¶
func (p *PriorityQueue) Len() int
func (*PriorityQueue) Pop ¶
func (p *PriorityQueue) Pop() (*Item, bool)
Pop update modifies the priority and value of an Item in the queue.
func (*PriorityQueue) Push ¶
func (p *PriorityQueue) Push(item *Item)
Click to show internal directories.
Click to hide internal directories.