Sha256: f57086cdab4164b295ca25092ff3040af0efebf8555c7c0feff616000cebbcbf
Contents?: true
Size: 485 Bytes
Versions: 20
Compression:
Stored size: 485 Bytes
Contents
module hamming; unittest { const int allTestsEnabled = 0; assert(distance("A", "A") == 0); static if (allTestsEnabled) { assert(distance("A", "G") == 1); assert(distance("AG", "CT") == 2); assert(distance("AT", "CT") == 1); assert(distance("GGACG", "GGTCG") == 1); assertThrown(distance("AAAG", "AAA")); assertThrown(distance("AAA", "AAAG")); assert(distance("GATACA", "GCATAA") == 4); assert(distance("GGACGGATTCTG", "AGGACGGATTCT") == 9); } }
Version data entries
20 entries across 20 versions & 1 rubygems