histogram

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Histogram

type Histogram[T comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable]() *Histogram[T]

func (*Histogram[T]) Add

func (h *Histogram[T]) Add(item T)

func (*Histogram[T]) Count

func (h *Histogram[T]) Count() int

func (*Histogram[T]) Items

func (h *Histogram[T]) Items() map[T]int

type SyncHistogram

type SyncHistogram[T comparable] struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewSync

func NewSync[T comparable]() *SyncHistogram[T]

func (*SyncHistogram[T]) Add

func (h *SyncHistogram[T]) Add(item T)

func (*SyncHistogram[T]) Count

func (h *SyncHistogram[T]) Count() int

func (*SyncHistogram[T]) Items

func (h *SyncHistogram[T]) Items() map[T]int

Jump to

Keyboard shortcuts

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