Miscellaneous Known Linear Codes

Some of the well-known codes are programmed into the library for convenience.

CodingTheory.HammingCodeFunction
HammingCode(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.
source
CodingTheory.TetraCodeFunction
TetraCode()

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.
source
CodingTheory.SimplexCodeFunction
SimplexCode(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.
source
CodingTheory.GolayCodeFunction
GolayCode(p::Int)

Return the [23, 12, 7]binary Golay code ifp == 2or the[11, 6, 5]ternary Golay code ifp == 3`.

source
CodingTheory.ExtendedGolayCodeFunction
ExtendedGolayCode(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.

source