Documentation
¶
Index ¶
- type Item
- type MinPQueue
- func (pq *MinPQueue) DecreaseItem(ip *Item) error
- func (pq *MinPQueue) GetMin() string
- func (pq *MinPQueue) IncreaseMin()
- func (pq MinPQueue) Len() int
- func (pq MinPQueue) Less(i, j int) bool
- func (pq *MinPQueue) Pop() interface{}
- func (pq *MinPQueue) Push(x interface{})
- func (pq *MinPQueue) PushItem(item *Item)
- func (pq *MinPQueue) RemoveItem(ip *Item) error
- func (pq MinPQueue) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
An Item is what we manage the queue.
type MinPQueue ¶
type MinPQueue []*Item
A MinPQueue implements heap.Interface and holds Items.
func (*MinPQueue) DecreaseItem ¶
DecreaseItem decrements the priority of the specified item
func (*MinPQueue) IncreaseMin ¶
func (pq *MinPQueue) IncreaseMin()
IncreaseMin increments the priority of the root item
func (*MinPQueue) Pop ¶
func (pq *MinPQueue) Pop() interface{}
Pop removes the last item and returns it
func (*MinPQueue) Push ¶
func (pq *MinPQueue) Push(x interface{})
Push adds the item to the end of the queue
func (*MinPQueue) RemoveItem ¶
RemoveItem removes the specified item from pq
Click to show internal directories.
Click to hide internal directories.