Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePermutations ¶
GeneratePermutations returns all the orderings (of booleans) for a given number of elements
Params
numElems - the number of elements
Returns
an array of boolean arrays
func GenerateSomePermutations ¶
GenerateSomePermutations returns "some" permutations (of booleans) for a given number of elements. Eg if numElems == 3, 9 (ie 3^2) permutations will be returned...
Params
numElems - the number of elements of each array.. in the return array returnSize - size of each return array (may require padding. Which can be with random vars or not...) randAll - randomize the elements that "fill" the random array (we pad at the beginning). false = no randomization => deterministic values
Returns
an array of boolean arrays (each of the given size), containing the combinations
func GetBinaryRep ¶
GetBinaryRep generates a binary representation in string format
Params
i - an integer >= 0 size >= 2^i
Returns
a string with binary representation of the integer, of length == size
func TypeVal ¶
func TypeVal(value interface{}) interface{}
TypeVal converts an interface to a type (for string, *string, bool, *bool, map[string]string, *map[string]string)
Params
value - a value. Cannot be nil
Returns
the value of the parameter (of the appopriate type, dereferenced if a pointer), or nil
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.