65.92 AugmentedCode

AugmentedCode( C, L )

AugmentedCode returns C after augmenting. C must be a linear code, L must be a list of codeword input. The generator matrix of the new code is a basis for the codewords specified by L as well as the words that were already in code C. Note that the new code in general will consist of more words than only the codewords of C and the words L. The returned code is also a linear code.

    gap> C31 := ReedMullerCode( 1, 3 );
    a linear [8,4,4]2 Reed-Muller (1,3) code over GF(2)
    gap> C32 := AugmentedCode(C31,["00000011","00000101","00010001"]);
    a linear [8,7,1..2]1 code, augmented with 3 word(s)
    gap> C32 = ReedMullerCode( 2, 3 );
    true 

AugmentedCode( C )

When called without a list of codewords, AugmentedCode returns C after adding the all-ones vector to the generator matrix. C must be a linear code. If the all-ones vector was already in the code, nothing happens and a copy of the argument is returned. If C is a binary code which does not contain the all-ones vector, the complement of all codewords is added.

    gap> C1 := CordaroWagnerCode(6);
    a linear [6,2,4]2..3 Cordaro-Wagner code over GF(2)
    gap> [0,0,1,1,1,1] in C1;
    true
    gap> C2 := AugmentedCode( C1 );
    a linear [6,3,1..2]2..3 code, augmented with 1 word(s)
    gap> [1,1,0,0,0,0] in C2;    # the complement of [001111]
    true 

The function AddedElementsCode adds elements to the codewords instead of adding them to the basis (see AddedElementsCode).

Previous Up Top Next
Index

GAP 3.4.4
April 1997