Combinatorics

Functions

Link copied to clipboard
fun <V> combinations(paths: List<List<V>>): List<List<V>>

Given a list of potential values at each index in a list, returns all possible combinations of those values.

Link copied to clipboard
inline fun <V> permutations(values: List<V>): List<List<V>>
Link copied to clipboard
fun <V> swap(ary: Array<V>, i: Int, j: Int)

Properties

Link copied to clipboard
val MAX_RESULTS: Int = 32