Macaulay2 » Documentation
Packages » CodingTheory » LinearCode » linearCode » zeroCode
next | previous | forward | backward | up | index | toc

# zeroCode -- zero code

- Usage:
    `zeroCode(F,n)`
- Inputs:
  - F, a Galois field,
  - n, an integer,
- Outputs:
  - an instance of the type LinearCode,

## Description

Constructs the linear code of length n over F whose only codeword is the zero codeword.

    i1 : C=zeroCode(GF(4),7)

                                           7
    o1 = LinearCode{AmbientModule => (GF 4)                                                                                                                                                             }
                    BaseField => GF 4
                    cache => CacheTable{}
                    GeneratorMatrix => 0
                    Generators => {{}}
                    ParityCheckMatrix => | 1 0 0 0 0 0 0 |
                                         | 0 1 0 0 0 0 0 |
                                         | 0 0 1 0 0 0 0 |
                                         | 0 0 0 1 0 0 0 |
                                         | 0 0 0 0 1 0 0 |
                                         | 0 0 0 0 0 1 0 |
                                         | 0 0 0 0 0 0 1 |
                    ParityCheckRows => {{1, 0, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 1}}

    o1 : LinearCode

    i2 : C.GeneratorMatrix

    o2 = 0

                  1       7
    o2 : Matrix ZZ  <-- ZZ

## Ways to use zeroCode:

- `zeroCode(GaloisField,ZZ)`

## For the programmer

The object zeroCode is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/CodingTheory.m2:3169:0.