Index of code constructionsΒΆ
The codes object may be used to access the codes that Sage can build.
BinaryGolayCode() |
This method is now deprecated. Please use sage.coding.golay_code.GolayCode instead. |
CyclicCodeFromCheckPolynomial() |
If h is a polynomial over GF(q) which divides then this constructs the code “generated by ” (ie, the code associated with the principle ideal in the ring in the usual way). The option “ignore” says to ignore the condition that the characteristic of the base field does not divide the length (the usual assumption in the theory of cyclic codes). |
CyclicCodeFromGeneratingPolynomial() |
If g is a polynomial over GF(q) which divides then this constructs the code “generated by g” (ie, the code associated with the principle ideal in the ring in the usual way). |
DuadicCodeEvenPair() |
Constructs the “even pair” of duadic codes associated to the “splitting” (see the docstring for _is_a_splitting for the definition) S1, S2 of n. |
DuadicCodeOddPair() |
Constructs the “odd pair” of duadic codes associated to the “splitting” S1, S2 of n. |
ExtendedBinaryGolayCode() |
This method is now deprecated. Please use sage.coding.golay_code.GolayCode instead. |
ExtendedQuadraticResidueCode() |
The extended quadratic residue code (or XQR code) is obtained from a QR code by adding a check bit to the last coordinate. (These codes have very remarkable properties such as large automorphism groups and duality properties - see [HP2003], Section 6.6.3-6.6.4.) |
ExtendedTernaryGolayCode() |
This method is now deprecated. Please use sage.coding.golay_code.GolayCode instead. |
QuadraticResidueCode() |
A quadratic residue code (or QR code) is a cyclic code whose generator polynomial is the product of the polynomials ( is a primitive root of unity; ranges over the set of quadratic residues modulo ). |
QuadraticResidueCodeEvenPair() |
Quadratic residue codes of a given odd prime length and base ring either don’t exist at all or occur as 4-tuples - a pair of “odd-like” codes and a pair of “even-like” codes. If is prime then (Theorem 6.6.2 in [HP2003]) a QR code exists over iff q is a quadratic residue mod . |
QuadraticResidueCodeOddPair() |
Quadratic residue codes of a given odd prime length and base ring either don’t exist at all or occur as 4-tuples - a pair of “odd-like” codes and a pair of “even-like” codes. If n 2 is prime then (Theorem 6.6.2 in [HP2003]) a QR code exists over GF(q) iff q is a quadratic residue mod n. |
QuasiQuadraticResidueCode() |
A (binary) quasi-quadratic residue code (or QQR code). |
RandomLinearCode() |
Deprecated alias of random_linear_code(). |
RandomLinearCodeGuava() |
The method used is to first construct a matrix of the block form , where is a identity matrix and is a matrix constructed using random elements of . Then the columns are permuted using a randomly selected element of the symmetric group . |
ReedMullerCode() |
Returns a Reed-Muller code. |
ReedSolomonCode() |
NO DOCSTRING |
TernaryGolayCode() |
This method is now deprecated. Please use sage.coding.golay_code.GolayCode instead. |
ToricCode() |
Let denote a list of lattice points in and let denote the set of all points in (ordered in some fixed way). Put and let denote the dimension of the vector space of functions . The associated toric code is the evaluation code which is the image of the evaluation map |
WalshCode() |
Returns the binary Walsh code of length . The matrix of codewords correspond to a Hadamard matrix. This is a (constant rate) binary linear code. |
from_parity_check_matrix() |
Return the linear code that has H as a parity check matrix. |
random_linear_code() |
Generate a random linear code of length length, dimension dimension and over the field F. |
Note
To import these names into the global namespace, use:
sage: from sage.coding.codes_catalog import *

then this constructs the code “generated by
” (ie, the code associated with the principle ideal
in the ring
in the usual way). The option “ignore” says to ignore the condition that the characteristic of the base field does not divide the length (the usual assumption in the theory of cyclic codes).
(
is a primitive
root of unity;
ranges over the set of quadratic residues modulo
).
is prime then (Theorem 6.6.2 in [HP2003]) a QR code exists over
iff q is a quadratic residue mod
matrix of the block form
, where
is a
identity matrix and
is a
matrix constructed using random elements of
. Then the columns are permuted using a randomly selected element of the symmetric group
.
denote a list of lattice points in
and let
denote the set of all points in
(ordered in some fixed way). Put
and let
denote the dimension of the vector space of functions
. The associated toric code
is the evaluation code which is the image of the evaluation map
. The matrix of codewords correspond to a Hadamard matrix. This is a (constant rate) binary linear
code.