orderedmap

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderedMap

type OrderedMap []pair

OrderedMap is a slice of pairs type with string keys and float values. It implement sorting methods by values.

func (OrderedMap) Len

func (p OrderedMap) Len() int

Len return length of a given OrderedMap

func (OrderedMap) Less

func (p OrderedMap) Less(i, j int) bool

Less return if a element of an OrderedMap is smaller than another

func (OrderedMap) SortByValues

func (p OrderedMap) SortByValues()

SortByValues sort by values an OrderedMap in decreasing order

func (OrderedMap) Swap

func (p OrderedMap) Swap(i, j int)

Swap two members of an OrderedMap

func (OrderedMap) ToArray

func (p OrderedMap) ToArray() []string

ToArray export keys of an OrderedMap into a slice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL