package
Version:
v2.7.3
Opens a new window with list of versions in this module.
Published: Aug 26, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type WgItem struct {
Element interface{}
Weight int
}
type WgRand struct {
RandItems WgItems
TotalWeight int
}
func (wrc *WgRand) AddElement(element interface{}, weight int)
func (wrc *WgRand) AddElements(elements map[interface{}]int)
func (wrc *WgRand) GetRandomChoice() (interface{}, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.