Documentation
¶
Index ¶
- func CoinFlip() bool
- func CoinFlipBias(bias float64) bool
- func FloatN(n float64) float64
- func IntN(n int) int
- func SliceSubsets(sLen, strLen int, bias float64) (parent []string, child []string)
- func SliceSubsetsList(sLen, strLen int, bias float64) (parent string, child string)
- func StringList(sLen, strLen int) string
- func StringN(n int) string
- func StringSlice(sliceLen, strLen int) (out []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoinFlipBias ¶
Provide desired win % for heads (heads = true). CoinFlipBias(51) would imply heads should win 51% of the time.
func SliceSubsets ¶
Uses `StringSlice` to generate a slice of strings. Then the bias parameter is passed to `CoinFlipBias` for each string in the set to produce a child slice containing a subset of the parent. The strings in the child slice retain their order from the parent.
func SliceSubsetsList ¶
The same as `SliceSubsets`, except the parent and child slices are each joined with "," into strings before being returned.
func StringList ¶
Same as `StringSlice`, except the slice is joined with "," into a single string at the end.
func StringSlice ¶
Generate a slice containing pseudo-random strings. Params are slice length and string length.
Types ¶
This section is empty.