65.10 TreatAsPoly

TreatAsPoly( obj )

TreatAsPoly adapts the codewords in obj to make sure they are printed as polynomials. obj may be a codeword or a list of codewords. Elements of obj that are not codewords are ignored. After this function is called, the codewords will be treated as polynomials. The finite field vector that defines the codeword is used as a coefficient list of the polynomial representation, where the first element of the vector is the coefficient of degree zero, the second element is the coefficient of degree one, etc, until the last element, which is the coefficient of highest degree.

Note that this only changes the way a codeword is printed. TreatAsPoly returns nothing, it is called only for its side effect. The function PolyCodeword converts codewords to polynomials (see PolyCodeword).

    gap> a := Codeword("00001",GF(2));
    [ 0 0 0 0 1 ]
    gap> TreatAsPoly(a); a;
    x^4
    gap> b := NullWord(6,GF(4));
    [ 0 0 0 0 0 0 ]
    gap> TreatAsPoly(b); b;
    0 

Previous Up Top Next
Index

GAP 3.4.4
April 1997