Miscellaneous Known Linear Codes
Some of the well-known codes are programmed into the library for convenience.
CodingTheory.RepetitionCode — FunctionRepetitionCode(q::Int, n::Int)Return the [n, 1, n] repetition code over GF(q).
CodingTheory.Hexacode — FunctionHexacode()Return the [6, 3, 4] hexacode over GF(4).
CodingTheory.HammingCode — FunctionHammingCode(q::Int, r::Int)Return the [(q^r - 1)/(q - 1), (q^r - 1)/(q - 1) - r, 3] Hamming code over GF(q).
Notes
- This is currently only implemented for binary codes.
CodingTheory.TetraCode — FunctionTetraCode()Return the [4, 2, 3] tetra code over GF(3).
Notes
- This is equiavlent to the
Hamming(3, 2, 3)code, but the construction here is based on the commonly presented generator and parity-check matrices.
CodingTheory.SimplexCode — FunctionSimplexCode(q::Int, r::Int)Return the [(q^r - 1)/(q - 1), r] simplex code over GF(q).
Notes
- Generator matrices for the binary codes are constructed using the standard recursive definition. The higher fields return
dual(HammingCode(q, r)). - This is currently only implemented for binary codes.
CodingTheory.GolayCode — FunctionGolayCode(p::Int)Return the [23, 12, 7]binary Golay code ifp == 2or the[11, 6, 5]ternary Golay code ifp == 3`.
CodingTheory.ExtendedGolayCode — FunctionExtendedGolayCode(p::Int)Return the [24, 12, 8] extended binary Golay code if p == 2 or the [12, 6, 6] extended ternary Golay code if p == 3.