Method |
Description |
|
alphaChars ( ) : Generator |
creates a generator that produces only alphabetic characters |
|
alphaNumChars ( ) : Generator |
creates a generator that produces alphanumeric characters |
|
alphaNumStrings ( ) : Generator |
creates a generator that produces alphanumeric strings |
|
alphaStrings ( ) : Generator |
creates a generator that produces alphabetic strings |
|
any ( ) |
|
|
anyPrintable ( ) |
|
|
arraysOf ( self $gen ) : Generator |
creates a generator that produces arrays whose elements
are chosen from $gen. |
|
asciiChars ( ) : Generator |
creates a generator that produces only ASCII characters |
|
asciiStrings ( ) : Generator |
creates a generator that produces ASCII strings |
|
bind ( callable $k ) : Generator |
creates a new generator that passes the result of this generator
to the callable $k which should return a new generator. |
|
booleans ( ) : Generator |
creates a generator that produces true or false. Shrinks to false. |
|
call ( Random $rng, integer $size ) : RoseTree |
invokes the generator with the given RNG and size |
|
chars ( ) : Generator |
creates a generator that produces characters from 0-255 |
|
choose ( integer $lower, integer $upper ) : Generator |
creates a generator that returns numbers in the range $lower to $upper, inclusive |
|
containerTypes ( self $innerType ) |
|
|
elements ( ) : Generator |
creates a generator that randomly chooses from the specified values |
|
fmap ( callable $f ) : Generator |
maps function f over the values produced by this generator |
|
forAll ( array $args, callable $f ) |
|
|
frequency ( ) : Generator |
creates a generator that produces values from specified generators based on
likelihoods. The likelihood of a generator being chosen is its likelihood divided
by the sum of all likelihoods. |
|
intRoseTree ( $val ) |
|
|
intoArrays ( ) : Generator |
creates a generator that produces arrays whose elements
are chosen from this generator. |
|
ints ( ) : Generator |
creates a generator that returns a positive or negative integer bounded
by the generators size parameter. |
|
maps ( self $keygen, self $valgen ) : Generator |
creates a generator that produces arrays with keys chosen from $keygen
and values chosen from $valgen. |
|
mapsFrom ( self $keygen ) : Generator |
creates a generator that produces arrays with keys chosen from
$keygen and values chosen from this generator. |
|
mapsTo ( self $valgen ) : Generator |
creates a generator that produces arrays with keys chosen from
this generator and values chosen from $valgen. |
|
mapsWith ( array $map ) : Generator |
creates a generator that produces arrays with the same keys as in $map
where each corresponding value is chosen from a specified generator. |
|
negInts ( ) : Generator |
creates a generator that produces negative integers bounded by
the generators size parameter. |
|
notEmpty ( $maxTries = 10 ) |
|
|
oneOf ( ) : Generator |
creates a new generator that randomly chooses a value from the list
of provided generators. Shrinks toward earlier generators as well as shrinking
the generated value itself. |
|
posInts ( ) : Generator |
creates a generator that produces positive integers bounded by
the generators size parameter. |
|
recursive ( callable $container, self $scalar ) |
|
|
resize ( integer $n ) : Generator |
creates a new generator based on this generator with size always bound to $n |
|
samples ( integer $maxSize = 100 ) : Generator |
returns an infinite sequence of random samples from this generator bounded by $maxSize |
|
simplePrintableTypes ( ) |
|
|
simpleTypes ( ) |
|
|
sizes ( $maxSize ) |
-------------------------------------------------- |
|
strictlyNegInts ( ) : Generator |
creates a generator that produces strictly negative integers bounded by
the generators size parameter. |
|
strictlyPosInts ( ) : Generator |
creates a generator that produces strictly positive integers bounded by
the generators size parameter. |
|
strings ( ) : Generator |
creates a generator that produces strings; may contain unprintable chars |
|
suchThat ( callable $pred, integer $maxTries = 10 ) : Generator |
creates a new generator that generates values from this generator such that they
satisfy callable $pred. |
|
takeSamples ( integer $num = 10 ) : array |
returns an array of $num random samples from this generator |
|
tuples ( ) : Generator |
creates a new generator that returns an array whose elements are chosen
from the list of given generators. Individual elements shrink according to
their generator but the array will never shrink in count. |
|
unit ( mixed $value ) : Generator |
creates a generator that always returns $value and never shrinks |
|