Documentation
¶
Overview ¶
Package comb contains combinatorics functions
Index ¶
- func CartesianProduct[T any](domains ...[]T) iter.Seq2[uint64, []T]
- func Factorial(n uint64) uint64
- func Permutations[T any](items []T) iter.Seq2[uint64, []T]
- func RangeCartesianProduct[T any](start, end uint64, domains ...[]T) iter.Seq2[uint64, []T]
- func RangePermutations[T any](start, end uint64, items []T) iter.Seq2[uint64, []T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CartesianProduct ¶
CartesianProduct creates an iterator for the Cartesian product of the given domains
func Permutations ¶
Permutations function creates an iterator for all possible permutations in lexicographic order This uses the Factoradic System to compute the Permutation based on the index
func RangeCartesianProduct ¶
RangeCartesianProduct creates an iterator for the Cartesian product of the given domains from index [start, end)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.