Let C be a code over a finite ring R of cardinality q, and suppose that the elements of R are ordered in some way. Then for a codeword v ∈C and the i-th element a ∈R, let si(v) denote the number of components of v equal to a.This function returns the complete weight enumerator ( W)C(X0, X1, ..., Xq - 1) of C, which is defined by: ( W)C(X0, X1, ..., Xq - 1) = ∑v ∈C((X0)s0(v)(X1)s1(v) ... (Xq - 1)sq - 1(v)). See [Wan97, p. 9] for more information. The result will lie in a global multivariate polynomial ring over Z with q variables. The angle-bracket notation may be used to assign names to the indeterminates.
Suppose C is a Z4-code. This function returns the symmetric weight enumerator sweC(X0, X1, X2) of C, which is defined by: sweC(X0, X1, X2) = ( W)C(X0, X1, X2, X1), where ( W)C is the complete weight enumerator, defined above. See [Wan97, p. 14] for more information. The result will lie in a global multivariate polynomial ring over Z with three variables. The angle-bracket notation may be used to assign names to the indeterminates.
Suppose C is a code over some finite ring R. This function returns the Hamming weight enumerator HamC(X, Y) of C, which is defined by: HamC(X, Y) = ∑v ∈C(Xn - wH(v)YwH(v)), where wH(v) is the Hamming weight function. The result will lie in a global multivariate polynomial ring over Z with two variables. The angle-bracket notation may be used to assign names to the indeterminates.
Suppose C is a Z4-code. This function returns the Lee weight enumerator LeeC(X, Y) of C, which is defined by: LeeC(X, Y) = ∑v ∈C(X2 * n - wL(v)YwL(v)), where wL(v) is the Lee weight function, defined in Section Lee Weight. The result will lie in a global multivariate polynomial ring over Z with two variables. The angle-bracket notation may be used to assign names to the indeterminates.
Suppose C is a Z4-code. This function returns the Euclidean weight enumerator EuclideanC(X, Y) of C, which is defined by: EuclideanC(X, Y) = ∑v ∈C(X4 * n - wE(v)YwE(v)), where wE(v) is the Euclidean weight function, defined in Section Euclidean Weight. The result will lie in a global multivariate polynomial ring over Z with two variables. The angle-bracket notation may be used to assign names to the indeterminates.
> R<w> := GR(4,2); > P<x> := PolynomialRing(R); > L := CyclotomicFactors(R, 3); > g := L[1]; > g; x + 3 > C := CyclicCode(3, g); > C; (3, 256, 2) Cyclic Code over GaloisRing(2, 2, 2) Generator matrix: [1 0 3] [0 1 3] > CWE<[X]> := CompleteWeightEnumerator(C); > CWE; X[1]^3 + 6*X[1]*X[2]*X[4] + 3*X[1]*X[3]^2 + 6*X[1]*X[5]*X[13] + 6*X[1]*X[6]*X[16] + 6*X[1]*X[7]*X[15] + 6*X[1]*X[8]*X[14] + 3*X[1]*X[9]^2 + 6*X[1]*X[10]*X[12] + 3*X[1]*X[11]^2 + 3*X[2]^2*X[3] + 6*X[2]*X[5]*X[16] + 6*X[2]*X[6]*X[15] + 6*X[2]*X[7]*X[14] + 6*X[2]*X[8]*X[13] + 6*X[2]*X[9]*X[12] + 6*X[2]*X[10]*X[11] + 3*X[3]*X[4]^2 + 6*X[3]*X[5]*X[15] + 6*X[3]*X[6]*X[14] + 6*X[3]*X[7]*X[13] + 6*X[3]*X[8]*X[16] + 6*X[3]*X[9]*X[11] + 3*X[3]*X[10]^2 + 3*X[3]*X[12]^2 + 6*X[4]*X[5]*X[14] + 6*X[4]*X[6]*X[13] + 6*X[4]*X[7]*X[16] + 6*X[4]*X[8]*X[15] + 6*X[4]*X[9]*X[10] + 6*X[4]*X[11]*X[12] + 3*X[5]^2*X[9] + 6*X[5]*X[6]*X[12] + 6*X[5]*X[7]*X[11] + 6*X[5]*X[8]*X[10] + 3*X[6]^2*X[11] + 6*X[6]*X[7]*X[10] + 6*X[6]*X[8]*X[9] + 3*X[7]^2*X[9] + 6*X[7]*X[8]*X[12] + 3*X[8]^2*X[11] + 3*X[9]*X[13]^2 + 6*X[9]*X[14]*X[16] + 3*X[9]*X[15]^2 + 6*X[10]*X[13]*X[16] + 6*X[10]*X[14]*X[15] + 6*X[11]*X[13]*X[15] + 3*X[11]*X[14]^2 + 3*X[11]*X[16]^2 + 6*X[12]*X[13]*X[14] + 6*X[12]*X[15]*X[16]
> Z4 := IntegerRing(4); > O8 := LinearCode<Z4, 8 | > [1,0,0,0,3,1,2,1], > [0,1,0,0,1,2,3,1], > [0,0,1,0,3,3,3,2], > [0,0,0,1,2,3,1,1]>; > #O8; 256 > CWE<X0,X1,X2,X3> := CompleteWeightEnumerator(O8); > CWE; X0^8 + 14*X0^4*X2^4 + 56*X0^3*X1^3*X2*X3 + 56*X0^3*X1*X2*X3^3 + 56*X0*X1^3*X2^3*X3 + 56*X0*X1*X2^3*X3^3 + X1^8 + 14*X1^4*X3^4 + X2^8 + X3^8 > SWE<X0,X1,X2> := SymmetricWeightEnumerator(O8); > SWE; X0^8 + 14*X0^4*X2^4 + 112*X0^3*X1^4*X2 + 112*X0*X1^4*X2^3 + 16*X1^8 + X2^8 > HWE<X,Y> := HammingWeightEnumerator(O8); > HWE; X^8 + 14*X^4*Y^4 + 112*X^3*Y^5 + 112*X*Y^7 + 17*Y^8 > LeeWeightEnumerator(O8); X^16 + 112*X^10*Y^6 + 30*X^8*Y^8 + 112*X^6*Y^10 + Y^16 > EuclideanWeightEnumerator(O8); X^32 + 128*X^24*Y^8 + 126*X^16*Y^16 + Y^32