Bit PermutationManager::InversePermutation(Bit bit, IPermutationTable* table) { int sz = bit.Size(); int n = table->Size(); Bit res(0, sz); for (int i = 0; i < n; i++) { if (bit[i]) res.Set(table->Get(i) - 1); } return res; }