Documentation ¶
Index ¶
- func CheckError(err error)
- func DelItem[T comparable](slice []T, item T) []T
- func IsItemIn[T comparable](slice []T, item T) bool
- func IsLower(s string) bool
- func IsMapIn[T comparable](mapSlice *[]map[string]T, mA map[string]T) bool
- func ParseStrInt(number string) int
- func ParseStringToIntSlice(input string) []int
- type Item
- type PriorityQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
func CheckError(err error)
func DelItem ¶
func DelItem[T comparable](slice []T, item T) []T
func IsItemIn ¶
func IsItemIn[T comparable](slice []T, item T) bool
func ParseStrInt ¶
func ParseStringToIntSlice ¶
Types ¶
type Item ¶
type Item struct { Value string Priority int // The Index is needed by update and is maintained by the heap.Interface methods. Index int // The index of the item in the heap. }
Item is something we manage in a priority queue.
type PriorityQueue ¶
type PriorityQueue []*Item
A PriorityQueue implements heap.Interface and holds Items.
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() any
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x any)
func (PriorityQueue) Swap ¶
func (pq PriorityQueue) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.