Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit bee08ca

Browse files
emes4dimpase
authored andcommitted
Documentation changes to coding module.
1 parent 30cac80 commit bee08ca

File tree

3 files changed

+57
-8
lines changed

3 files changed

+57
-8
lines changed

src/doc/en/reference/coding/index.rst

+23-6
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ Coding theory is the mathematical theory for algebraic and combinatorial codes
77
used for forward error correction in communications theory. Sage provides an
88
extensive library of objects and algorithms in coding theory.
99

10-
Basic objects in coding theory are channels, codes, linear codes, encoders, and
10+
Basic objects in coding theory are codes, channels, encoders, and
1111
decoders. The following modules provide the base classes defining them.
1212

1313
.. toctree::
1414
:maxdepth: 1
1515

1616
sage/coding/abstract_code
17-
sage/coding/linear_code_no_metric
18-
sage/coding/linear_code
19-
sage/coding/linear_rank_metric
2017
sage/coding/channel
2118
sage/coding/encoder
2219
sage/coding/decoder
@@ -33,8 +30,28 @@ the parameters of linear codes are provided.
3330
sage/coding/encoders_catalog
3431
sage/coding/bounds_catalog
3532

36-
Families of Codes
37-
-----------------
33+
34+
Linear Codes
35+
------------
36+
37+
The following module is a base class for linear code objects regardless their
38+
metric.
39+
40+
.. toctree::
41+
:maxdepth: 1
42+
43+
sage/coding/linear_code_no_metric
44+
45+
There is a number of representatives of linear codes over a specific metric.
46+
47+
.. toctree::
48+
:maxdepth: 1
49+
50+
sage/coding/linear_code
51+
sage/coding/linear_rank_metric
52+
53+
Families of Linear Codes
54+
------------------------
3855

3956
Famous families of codes, listed below, are represented in Sage by their own
4057
classes. For some of them, implementations of special decoding algorithms or

src/sage/coding/abstract_code.py

+33-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,41 @@
11
r"""
2-
Base class for Codes
2+
Codes
33
44
Class supporting methods available for any type of code (linear, non-linear) and
55
over any metric (Hamming, rank).
66
7+
There are further abstract classes representing certain types of codes. For
8+
linear codes,
9+
:class:`~sage.coding.linear_code_no_metric.AbstractLinearCodeNoMetric` contains
10+
all the methods that any linear code can use regardless of its metric.
11+
Inheriting from this class are base classes for linear codes over specific
12+
metrics. For example, :class:`~sage.coding.linear_code.AbstractLinearCode` is a
13+
base class for all linear codes over the Hamming metric.
14+
15+
Take the class :class:`~sage.coding.hamming_code.HammingCode`. This
16+
class inherits from :class:`~sage.coding.linear_code.AbstractLinearCode`, since
17+
it is a linear code over the Hamming metric.
18+
:class:`~sage.coding.linear_code.AbstractLinearCode` then inherits from
19+
:class:`~sage.coding.linear_code_no_metric.AbstractLinearCodeNoMetric`, since it
20+
is a linear code. Finally, this class inherits from
21+
:class:`~sage.coding.abstract_code.AbstractCode`, since it is a code.
22+
23+
24+
The following diagram shows the inheritance relationship in the coding module::
25+
26+
AbstractCode
27+
+ AbstractLinearCodeNoMetric
28+
| + AbstractLinearCode
29+
| | + ParityCheckCode
30+
| | + HammingCode
31+
| | + CyclicCode
32+
| | + BCHCode
33+
| | + GolayCode
34+
| | + ReedMullerCode
35+
| | + GeneralizedReedSolomonCode
36+
| | + GoppaCode
37+
| + AbstractLinearRankMetricCode
38+
739
Any class inheriting from AbstractCode can use the encode/decode framework.
840
941
The encoder/decoder framework within the coding module offers the creation and

src/sage/coding/linear_code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
r"""
3-
Linear codes
3+
Generic structures for linear codes over the Hamming metric
44
55
Linear Codes
66
============

0 commit comments

Comments
 (0)