Documentation ¶
Index ¶
- func CombinationsInt(list []int, length int) (c chan []int)
- func CombinationsInterface(list []interface{}, length int) (c chan []interface{})
- func CombinsSliceInterface(c chan []interface{}, combin []interface{}, data [][]interface{})
- func GenerateProductInt(data []int, length int) <-chan []int
- func GenerateProductString(data []string, length int) <-chan []string
- func ProductInt(c chan []int, combin []int, data []int, length int)
- func ProductString(c chan []string, combin []string, data []string, length int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombinationsInt ¶
combinations([]int{1, 2, 3, 4}, 2) => [1 2] [1 3] [1 4] [2 3] [2 4] [3 4]
func CombinationsInterface ¶
func CombinationsInterface(list []interface{}, length int) (c chan []interface{})
func CombinsSliceInterface ¶
func CombinsSliceInterface(c chan []interface{}, combin []interface{}, data [][]interface{})
example: [[1 2 3 4] [5 6 7 8]] ==> [[1 5] [1 6] [1 7] [1 8] [2 5] [2 6] [2 7] [2 8] [3 5] [3 6] [3 7] [3 8] [4 5] [4 6] [4 7] [4 8]]
func GenerateProductInt ¶
GenerateCombinationsInt([]int{1,2,3,4}, 2) ==> [1 1][1 2][1 3][1 4][2 1][2 2][2 3][2 4][3 1][3 2][3 3][3 4][4 1][4 2][4 3][4 4]
func GenerateProductString ¶
[a b c d] ==> [[a a] [a b] [a c] [a d] [b a] [b b] [b c] [b d] [c a] [c b] [c c] [c d] [d a] [d b] [d c] [d d]]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.