distribution

package
v0.0.0-...-1bf4dee Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteDistribution

type ByteDistribution struct {
	// contains filtered or unexported fields
}

func NewByteDistribution

func NewByteDistribution() *ByteDistribution

func (*ByteDistribution) Add

func (d *ByteDistribution) Add(b byte, n int) error

func (*ByteDistribution) Clear

func (d *ByteDistribution) Clear()

func (*ByteDistribution) Ordering

func (d *ByteDistribution) Ordering() []byte

type Distribution

type Distribution[T any] interface {
	Add(a T, n int) error
	Ordering() []T
	Clear()
}

type LetterDistribution

type LetterDistribution struct {
	// contains filtered or unexported fields
}

func NewLetterDistribution

func NewLetterDistribution() *LetterDistribution

func (*LetterDistribution) Add

func (l *LetterDistribution) Add(r rune, n int) error

func (*LetterDistribution) Clear

func (l *LetterDistribution) Clear()

func (*LetterDistribution) Ordering

func (l *LetterDistribution) Ordering() []rune

Jump to

Keyboard shortcuts

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