gohistogram

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: MIT Imports: 4 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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) Add

func (hist *Strings) Add(key string)

Add will add the specified key to the histogram.

func (*Strings) FoldDuplicateKeys

func (hist *Strings) FoldDuplicateKeys()

FoldDuplicateKeys aggregates counts of like keys in O(n) time.

func (*Strings) Len

func (hist *Strings) Len() int

func (*Strings) Less

func (hist *Strings) Less(i, j int) bool

func (*Strings) Print

func (hist *Strings) Print(width int) error

Print displays the histogram with three columns: Key, Count, and a histogram of stars.

func (*Strings) PrintRaw added in v0.3.0

func (hist *Strings) PrintRaw() error

PrintRaw displays the histogram with two columns: Count, and Key.

func (*Strings) PrintWithPercent

func (hist *Strings) PrintWithPercent(width int) error

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()

func (*Strings) Swap

func (hist *Strings) Swap(i, j int)

Jump to

Keyboard shortcuts

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