Documentation
¶
Index ¶
- type Strings
- func (hist *Strings) Add(key string)
- func (hist *Strings) FoldDuplicateKeys()
- func (hist *Strings) Len() int
- func (hist *Strings) Less(i, j int) bool
- func (hist *Strings) Print(width int) error
- func (hist *Strings) PrintRaw() error
- func (hist *Strings) PrintWithPercent(width int) error
- func (hist *Strings) SortAscending()
- func (hist *Strings) SortDescending()
- func (hist *Strings) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Strings ¶
type Strings struct {
// contains filtered or unexported fields
}
Strings is a histogram of strings.
func (*Strings) FoldDuplicateKeys ¶
func (hist *Strings) FoldDuplicateKeys()
FoldDuplicateKeys aggregates counts of like keys in O(n) time.
func (*Strings) Print ¶
Print displays the histogram with three columns: Key, Count, and a histogram of stars.
func (*Strings) PrintRaw ¶ added in v0.3.0
PrintRaw displays the histogram with two columns: Count, and Key.
func (*Strings) PrintWithPercent ¶
PrintWithPercent displays the histogram with four columns: Key, Count, Percent, and a histogram of stars.
func (*Strings) SortAscending ¶
func (hist *Strings) SortAscending()
func (*Strings) SortDescending ¶
func (hist *Strings) SortDescending()