Sign in to contribute to source. how it works

Type definition file data.Permute by barry

/*
{"description" : "This interface supports iterating through permutations, where a collection of permutations is expressed as an array of integers (alongside a correlated array of maximum values for each cell in the array). An optionsLock array can be optionally supplied, which indicates if each array cell's value should not be adjusted from its initial value during permutation generation."}
*/
interface Permute {
/* { "@description" : "Get the first permutation of a set of options. This function returns the first permutation."} */
int[] getFirst(int options[], int optionsMax[], opt bool optionsLock[])
/* { "@description" : "Get the next permutation of a set of options, passing in the previous permutation as the options parameter. This function returns the next permutation, or null if there were no more permutations. "} */
int[] getNext(int options[], int optionsMax[], opt bool optionsLock[])
}

Revision history

To propose a new revision to this entity, use

`dana source put -ut your/new/version.dn -n data.Permute.Permute -m "reason for update" -u yourUsername`

Version 1 (this version) by barry

Notes for this version: Standard Library Initialisation