Skip to content

Latest commit

 

History

History
executable file
·
17 lines (15 loc) · 498 Bytes

README.adoc

File metadata and controls

executable file
·
17 lines (15 loc) · 498 Bytes

Linear Hamming Code Generator

Not the Large Hadron Collider but a neat tool to generate the linear Hamming Code that is perfect for your needs.

Simple Usage

For Frank:

from lhc_gen import LHC
code = LHC(5, extended=True) # generate extended Hamming code for source alphabet length 5
# print generator and parity check matrix
code.H
code.G
# example encoding and decoding
code.encode(11111)
code.decode(1111111100)