Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶ added in v2.2.0
type Item[T SeedType] struct { // contains filtered or unexported fields }
type WeightRand ¶ added in v2.2.0
type WeightRand[T SeedType] struct { // contains filtered or unexported fields }
func NewWeightRand ¶ added in v2.2.0
func NewWeightRand[T SeedType](items ...T) *WeightRand[T]
func (*WeightRand[T]) Add ¶ added in v2.2.0
func (w *WeightRand[T]) Add(it T)
func (*WeightRand[T]) AddWeight ¶ added in v2.2.0
func (w *WeightRand[T]) AddWeight(it T, weight int)
func (*WeightRand[T]) Get ¶ added in v2.2.0
func (w *WeightRand[T]) Get() (t T)
Click to show internal directories.
Click to hide internal directories.