Macaulay2 » Documentation
Packages » CodingTheory » LinearCode » ambientSpace » vectorSpace
next | previous | forward | backward | up | index | toc

# vectorSpace -- vector space of a code

- Usage:
    `vectorSpace C`
- Inputs:
  - C, an instance of the type LinearCode,
- Outputs:
  - a module, $V$

## Description

Given a linear code C, this function returns $V$, the vector space spanned by the rows of a generator matrix of C.

    i1 : H = hammingCode(2,3);

    i2 : vectorSpace H

    o2 = image | 1 1 1 0 |
               | 1 0 1 1 |
               | 1 1 0 1 |
               | 1 0 0 0 |
               | 0 1 0 0 |
               | 0 0 1 0 |
               | 0 0 0 1 |

                                         7
    o2 : GF 2-module, submodule of (GF 2)

The next is an example for the class of EvaluationCode.

    i3 : RM = reedMullerCode(2,4,1);

    i4 : vectorSpace(RM.LinearCode)

    o4 = image | 1 0 0 1 1 |
               | 1 0 0 1 0 |
               | 1 1 1 0 1 |
               | 1 1 1 0 0 |
               | 1 0 0 0 0 |
               | 1 0 0 0 1 |
               | 1 0 1 0 0 |
               | 1 0 1 1 1 |
               | 1 0 1 1 0 |
               | 1 0 1 0 1 |
               | 1 1 0 0 1 |
               | 1 1 0 1 0 |
               | 1 1 0 1 1 |
               | 1 1 0 0 0 |
               | 1 1 1 1 0 |
               | 1 1 1 1 1 |

                                         16
    o4 : GF 2-module, submodule of (GF 2)

## Ways to use vectorSpace:

- `vectorSpace(LinearCode)`

## For the programmer

The object vectorSpace is a method function.

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