Documentation ¶
Index ¶
- type Comparable
- type HashedHeap
- func (h *HashedHeap) Del(key string) (deleteValue Comparable)
- func (h *HashedHeap) Get(key string) (value Comparable)
- func (h *HashedHeap) Len() int
- func (h *HashedHeap) Peek() (value Comparable)
- func (h *HashedHeap) Pop() (value Comparable)
- func (h *HashedHeap) Set(key string, value Comparable) (evictValue Comparable)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparable ¶
type Comparable interface {
Less(b interface{}) bool
}
Comparable is an interface that allows object to order through comparison.
type HashedHeap ¶
type HashedHeap struct {
// contains filtered or unexported fields
}
HashedHeap is a data structure for hash and priority queue.
func (*HashedHeap) Del ¶
func (h *HashedHeap) Del(key string) (deleteValue Comparable)
Del deletes value by key.
func (*HashedHeap) Get ¶
func (h *HashedHeap) Get(key string) (value Comparable)
Get get value by key.
func (*HashedHeap) Peek ¶
func (h *HashedHeap) Peek() (value Comparable)
Peek peek value by priority.
func (*HashedHeap) Set ¶
func (h *HashedHeap) Set(key string, value Comparable) (evictValue Comparable)
Set set value by key.
Click to show internal directories.
Click to hide internal directories.