Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChooseSet ¶
func ChooseSet[T any](start, stopInclusive int, kind func(pair propcheck.SimpleRNG) (T, propcheck.SimpleRNG), lt func(l, r T) bool, eq func(l, r T) bool) func(propcheck.SimpleRNG) ([]T, propcheck.SimpleRNG)
Generates a set with A size in the indicated range using the given Gen lt - a predicate function that returns true if l is lexically less than r eq - a predicate function that returns true if l is equal to r Note that the returned set may not meet the minimum size requirement after de-duplication. This is impossible to handle in any general way(i.e. the set of bools with cardinality == 3).
func ToSet ¶
Makes a "real" set from an array. A "real" set is an array without duplicates based upon the given equality predicate. Note the set operations in arrays package do not depend on the array being "real". Making a set is expensive because it requires sorting and de-duplication. lt - a predicate function that returns true if l is lexically less than r eq - a predicate function that returns true if l is equal to r
Types ¶
This section is empty.