Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InternalItem ¶
type InternalItem struct { Value interface{} // The value of the item; arbitrary. Priority int // The priority of the item in the queue. // contains filtered or unexported fields }
An InternalItem is something we manage in a priority queue.
type PriorityQueue ¶
type PriorityQueue struct {
// contains filtered or unexported fields
}
func New ¶
func New() *PriorityQueue
func (*PriorityQueue) IsEmpty ¶
func (self *PriorityQueue) IsEmpty() bool
func (*PriorityQueue) Pop ¶
func (self *PriorityQueue) Pop() interface{}
func (*PriorityQueue) Push ¶
func (self *PriorityQueue) Push(v interface{}, priority int) interface{}
return internal _ITEM
func (*PriorityQueue) Update ¶
func (self *PriorityQueue) Update(item *InternalItem, value interface{}, priority int)
Click to show internal directories.
Click to hide internal directories.