Handbook
Glossary
vose
Vocabulary
math
.
extras
Definition
USING:
arrays
math
;
IN:
math.extras
TUPLE:
vose
{
n
fixnum
initial:
0
}
{
items
array
initial:
{
}
}
{
probs
array
initial:
{
}
}
{
alias
array
initial:
{
}
}
;
Methods
USING:
accessors
kernel
kernel.private
math
math.extras
random
sequences.private
;
M::
vose
random*
( obj rnd -- elt )
obj
n>>
rnd
random*
{
fixnum
}
declare
dup
obj
probs>>
nth-unsafe
{
float
}
declare
rnd
random-unit*
>=
[
obj
alias>>
nth-unsafe
{
fixnum
}
declare
]
unless
obj
items>>
nth-unsafe
;