ExtendedDirectSumCode( L, B, m )
The extended direct sum construction is described in an article by Graham and Sloane. The resulting code consists of m copies of L, extended by repeating the codewords of B m times.
Suppose L is an [n_L, k_L]r_L code, and B is an [n_L, k_B]r_B code (non-linear codes are also permitted). The length of B must be equal to the length of L. The length of the new code is n = m n_L, the dimension (in the case of linear codes) is k leq m k_L + k_B, and the covering radius is r leq lfloor m Psi( L, B ) rfloor, with Psi( L, B ) = max_u in F_2^n_L frac12^k_B sum_v in B mboxd( L, v + u ). However, this computation will not be executed, because it may be too time consuming for large codes.
If L subseteq B , and L and B are linear codes, the last copy of L is omitted. In this case the dimension is k = m k_L + ( k_B - k_L ).
gap> c := HammingCode( 3, GF(2) ); a linear [7,4,3]1 Hamming (3,2) code over GF(2) gap> d := WholeSpaceCode( 7, GF(2) ); a cyclic [7,7,1]0 whole space code over GF(2) gap> e := ExtendedDirectSumCode( c, d, 3 ); a linear [21,15,1..3]2 3-fold extended direct sum code
GAP 3.4.4