is a string provided for additional hashing information to avoid systemic bias in the selection process across different test suites. Specifically every Case with the same input values being included or skipped regardless of the operation that they are testing. This string should be something like the name of the case cache the values are for or the operation under test.
number of cases targeted be returned. Expected to be a positive integer. If equal or greater than the number of cases, then all the cases are returned. 0 is not allowed, since it is likely a programming error, because if the caller intentionally wants 0 items, they can just use [].
list of Cases to be selected from.
Generated using TypeDoc
Filters a given set of Cases down to a target number of cases by randomly selecting which Cases to return.
The selection algorithm is deterministic and stable for a case's inputs.
This means that if a specific case is selected is not affected by the presence of other cases in the list, so in theory it is possible to create a pathological set of cases such that all or not of the cases are selected in spite of the target number.
This is a trade-off from guaranteeing stability of the selected cases over small changes, so the target number of cases is more of a suggestion. It is still guaranteed that if you set n0 < n1, then the invocation with n0 will return at most the number of cases that n1 does, it just isn't guaranteed to be less.