65.13 Support

Support( c )

Support returns a set of integers indicating the positions of the non-zero entries in a codeword c.

    gap> a := Codeword("012320023002");; Support(a);
    [ 2, 3, 4, 5, 8, 9, 12 ]
    gap> Support(NullWord(7));
    [  ] 

The support of a list with codewords can be calculated by taking the union of the individual supports. The weight of the support is the length of the set.

    gap> L := Codeword(["000000", "101010", "222000"], GF(3));;
    gap> S := Union(List(L, i -> Support(i)));
    [ 1, 2, 3, 5 ]
    gap> Length(S);
    4 

Previous Up Top Next
Index

GAP 3.4.4
April 1997