Documentation ¶
Index ¶
- type Element
- type MinHeap
- func (mh MinHeap) Len() int
- func (mh MinHeap) Less(i, j int) bool
- func (mh *MinHeap) PeekEl() *Element
- func (mh *MinHeap) Pop() interface{}
- func (mh *MinHeap) PopEl() *Element
- func (mh *MinHeap) Push(x interface{})
- func (mh *MinHeap) PushEl(el *Element)
- func (mh *MinHeap) RemoveEl(el *Element)
- func (mh MinHeap) Swap(i, j int)
- func (mh *MinHeap) UpdateEl(el *Element, priority int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct { Value interface{} Priority int // The priority of the item in the queue. // contains filtered or unexported fields }
An Element is something we manage in a priority queue.
Click to show internal directories.
Click to hide internal directories.