bool AllKeysEqual(PermutationKey key) { for (var i = 0; i < 10; i++) { if (key[i] != this[i]) return false; } return true; }
static bool AllKeysZero(PermutationKey key) { for (var i = 0; i < 10; i++) { if (key[i] != 0) return false; } return true; }
public static PermutationKey CreateKey(long i) { var key = new PermutationKey(); var iStr = i.ToString(); foreach (var index in iStr.Select(ch => int.Parse(ch.ToString()))) { key[index] = key[index] + 1; } return key; }