Module sample
Strategies for generating values by taking samples of collections.
Note that the strategies in this module are not native combinators; that is, the input collection is not itself a strategy, but is rather fixed when the strategy is created.
Structs
- Index A stand-in for an index into a slice or similar collection or conceptually similar things.
-
IndexStrategy
Strategy to create
Indexes. -
IndexValueTree
ValueTreecorresponding toIndexStrategy. - Select Strategy to produce one value from a fixed collection of options.
-
SelectValueTree
ValueTreecorresponding toSelect. - Selector A value for picking random values out of iterators.
-
SelectorStrategy
Strategy to create
Selectors. -
SelectorValueTree
ValueTreecorresponding toSelectorStrategy. -
Subsequence
Strategy to generate
Vecs by sampling a subsequence from another collection. -
SubsequenceValueTree
ValueTreetype forSubsequence.
Functions
-
select
Create a strategy which uniformly selects one value from
values. -
subsequence
Sample subsequences whose size are within
sizefrom the given collectionvalues.