Print( C )
Print
prints information about C. This is the same as typing the
identifier C at the GAP-prompt.
If the argument is an unrestricted code, information in the form
a (
n,
M,
d)
r ... code over GF(q)
is printed, where n is the word length, M the number of elements of the code, d the minimum distance and r the covering radius.
If the argument is a linear code, information in the form
a linear [
n,
k,
d]
r ... code over GF(q)
is printed, where n is the word length, k the dimension of the code, d the minimum distance and r the covering radius.
In all cases, if d is not yet known, it is displayed in the form
lowerbound,..
,upperbound
and if r is not yet known, it is displayed in the same way.
The function Display
gives more information. See Display.
gap> C1 := ExtendedCode( HammingCode( 3, GF(2) ) ); a linear [8,4,4]2 extended code gap> Print( "This is ", NordstromRobinsonCode(), ". \n"); This is a (16,256,6)4 Nordstrom-Robinson code over GF(2).
String( C )
String
returns information about C in a string. This function is used
by Print
(see Print
).
Save( filename, C, varname )
Save
prints the code C to a file with file name filename. If the
file does not exist, it is created. If it does exist, the previous
contents are erased, so be careful. The code is saved with variable name
varname. The code can be read back by calling Read(filename)
. The
code then has name varname. Note that filename and varname are
strings.
gap> C1 := HammingCode( 4, GF(3) ); a linear [40,36,3]1 Hamming (4,3) code over GF(3) gap> Save( "mycodes.lib", C1, "Ham_4_3"); gap> Read( "mycodes.lib" ); Ham_4_3; a linear [40,36,3]1 Hamming (4,3) code over GF(3) gap> Ham_4_3 = C1; true
GAP 3.4.4