Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dgryski/go-discreterand
/ functions
Functions
5 in github.com/dgryski/go-discreterand
⨍
Functions
5
◇
Types & classes
2
↓ 4 callers
Method
pop
()
alias.go:32
↓ 2 callers
Method
push
(i int)
alias.go:28
↓ 1 callers
Function
NewAlias
NewAlias constructs an AliasTable that will generate the discrete distribution given in probabilities. The probabilities array should sum to 1.
alias.go:41
↓ 1 callers
Method
Next
Next returns the next random value from the discrete distribution
alias.go:95
Function
TestAlias
(t *testing.T)
alias_test.go:9