Revision d4212e97
Added by Leszek Koltunski 12 months ago
src/main/java/org/distorted/objectlib/tablebases/TablebaseHelpers.java | ||
---|---|---|
123 | 123 |
// significant digit can be one of the {0...,n-1}, the next most significant - one of the {0,...,n-2}, |
124 | 124 |
// etc. |
125 | 125 |
// 4) the ret = ret*(permSize-i) + k is a transform from this ( n-1,n-2,...,2 ) notation to an index. |
126 |
// |
|
127 |
// 'avail' is initially set to {0,n-1,n-2,...,2,1} because that implies that an 'empty' permutation |
|
128 |
// gets mapped to index=0. |
|
126 | 129 |
|
127 | 130 |
public static int computePermutationNum(int[] buffer) |
128 | 131 |
{ |
Also available in: Unified diff
comment