Macaulay2 » Documentation
Packages » CodingTheory > LinearCode > linearCode > ParityCheck > randLDPC
next | previous | forward | backward | up | index | toc

randLDPC -- low density parity check matrix

Synopsis

Description

The parameter n indicates the number of columns of $H$. The number of rows of $H$ is n-k. The real number m indicates the slope of the line which relates n and the number of ones in $H$. Finally, b indicates the constant term of the line which relates $n$ and the number of ones in $H$. The number of ones in $H$ is determined by the formula floor(n*m) + b. Since this formula is linear in the number of columns of $H$, randLDPC produces a sparse matrix, for a fixed set of parameters n, k, m and b.

i1 : randLDPC(15,5,3.0,0)

o1 = | 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 |
     | 1 1 0 0 1 0 0 1 0 1 0 0 0 0 0 |
     | 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 |
     | 1 0 1 0 0 0 0 0 1 1 0 0 0 1 0 |
     | 0 0 1 1 0 1 0 1 0 0 0 0 1 1 0 |
     | 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 |
     | 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 |
     | 1 0 1 0 0 1 0 0 0 1 1 0 0 1 1 |
     | 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 |
     | 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 |

                  10           15
o1 : Matrix (GF 2)   <-- (GF 2)

Ways to use randLDPC :

For the programmer

The object randLDPC is a method function.