]> git.sesse.net Git - hamming/commitdiff
Added a note about how the transposition table works.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 1 Mar 2006 23:43:55 +0000 (23:43 +0000)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 1 Mar 2006 23:43:55 +0000 (23:43 +0000)
hamming.c

index 03714582b4ac5018e95551d86798f4d8dbf6fc50..215b1dda80b9e50db0a6faf6faef2a0b00fb487f 100644 (file)
--- a/hamming.c
+++ b/hamming.c
@@ -9,7 +9,8 @@ unsigned char hamming_lookup[NUM_DATA_WORDS];
 
 /* 
  * Needed since we store all the parity at the end of the word, not at the expected
- * power-of-two bit positions.
+ * power-of-two bit positions. This is the inverse of the mapping
+ * (0..15) -> (0, 8, 4, 2, 1, the rest in ascending order)
  */
 unsigned char permutation_table[CODE_BITS] = {
        0, 4, 3, 5, 2, 6, 7, 8, 1, 9, 10, 11, 12, 13, 14, 15