bias

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List[T any] struct {
	// contains filtered or unexported fields
}

func NewList

func NewList[T any](items []ListItem[T]) *List[T]

func NewSeededList

func NewSeededList[T any](items []ListItem[T], seed *rand.Rand) *List[T]

func (*List[T]) Next

func (l *List[T]) Next() T

Next returns a biased random element

type ListItem

type ListItem[T any] struct {
	Item   T
	Weight float64
}

Jump to

Keyboard shortcuts

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