 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PriorityQueue ¶
type PriorityQueue[T comparable, P Priority] struct { // contains filtered or unexported fields }
PriorityQueue provides a generic priority queue implementation with a built-in index for removals. https://pkg.go.dev/container/heap#example-package-PriorityQueue
func NewPriorityQueue ¶
func NewPriorityQueue[T comparable, P Priority]() PriorityQueue[T, P]
NewPriorityQueue creates a new empty priority queue.
func (*PriorityQueue[T, P]) Len ¶
func (pq *PriorityQueue[T, P]) Len() int
Len returns the number of elements in the queue.
func (*PriorityQueue[T, P]) Peek ¶
func (pq *PriorityQueue[T, P]) Peek() (T, bool)
Peek returns the top element from the queue without removing it.
func (*PriorityQueue[T, P]) Pop ¶
func (pq *PriorityQueue[T, P]) Pop() (T, bool)
Pop pops an element from the queue.
func (*PriorityQueue[T, P]) Push ¶
func (pq *PriorityQueue[T, P]) Push(val T, pri P)
Push pushes an element into the queue.
func (*PriorityQueue[T, P]) Remove ¶
func (pq *PriorityQueue[T, P]) Remove(val T) bool
Remove removes an arbitrary element from the queue.
type SyncMap ¶
type SyncMap[K comparable, V any] struct { // contains filtered or unexported fields }
Thread-safe generic map.
func NewSyncMap ¶
func NewSyncMap[K comparable, V any]() SyncMap[K, V]
 Click to show internal directories. 
   Click to hide internal directories.