Documentation
¶
Index ¶
- func CopyMap[K comparable, V any](m map[K]V) map[K]V
- func FindMapElements[K comparable, V any](keys []K, m map[K]V) (res []V)
- func FullMergeMaps(mapA map[string]any, mapB map[string]any) (res map[string]any)
- func GetValues[K comparable, V any](m map[K]V) (res []V)
- func MergeMapsOfArrays(mapA map[string]interface{}, mapB map[string]interface{}) (res map[string]interface{})
- func MergeSlicesUnique[T string | int](ss ...[]T) (res []T)
- func Min[T number](a T, b T) T
- func RightMergeMaps[T comparable, V any](left map[T]V, right map[T]V) (res map[T]V)
- type Item
- type Pair
- type PriorityQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyMap ¶
func CopyMap[K comparable, V any](m map[K]V) map[K]V
func FindMapElements ¶
func FindMapElements[K comparable, V any](keys []K, m map[K]V) (res []V)
func FullMergeMaps ¶
func GetValues ¶
func GetValues[K comparable, V any](m map[K]V) (res []V)
func MergeMapsOfArrays ¶
func MergeSlicesUnique ¶
func RightMergeMaps ¶
func RightMergeMaps[T comparable, V any](left map[T]V, right map[T]V) (res map[T]V)
Types ¶
type Pair ¶
type Pair[T, V any] struct { First T Second V }
func MapToPairs ¶
func MapToPairs[T comparable, V any](m map[T]V) (res []Pair[T, V])
type PriorityQueue ¶
type PriorityQueue struct {
// contains filtered or unexported fields
}
func NewPriorityQueue ¶
func NewPriorityQueue(itemCap int) PriorityQueue
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x interface{})
Click to show internal directories.
Click to hide internal directories.