Skip to content

Commit

Permalink
Fix "References" sections in docstrings
Browse files Browse the repository at this point in the history
Fixes #281
  • Loading branch information
mhostetter committed Apr 3, 2022
1 parent 3cf3819 commit bca9e1d
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion galois/_codes/_bch.py
Expand Up @@ -959,7 +959,7 @@ def decode_calculate(codeword, syndrome, t, primitive_element, ADD, SUBTRACT, MU
"""
References
----------
* S. Lin and D. Costello. Error Control Coding. Section 7.4.
* Lin, S. and Costello, D. Error Control Coding. Section 7.4.
"""
args = CHARACTERISTIC, DEGREE, IRREDUCIBLE_POLY
dtype = codeword.dtype
Expand Down
2 changes: 1 addition & 1 deletion galois/_codes/_reed_solomon.py
Expand Up @@ -869,7 +869,7 @@ def decode_calculate(codeword, syndrome, c, t, primitive_element, ADD, SUBTRACT,
"""
References
----------
* S. Lin and D. Costello. Error Control Coding. Section 7.4.
* Lin, S. and Costello, D. Error Control Coding. Section 7.4.
"""
args = CHARACTERISTIC, DEGREE, IRREDUCIBLE_POLY
dtype = codeword.dtype
Expand Down
6 changes: 3 additions & 3 deletions galois/_fields/_factory.py
Expand Up @@ -714,8 +714,8 @@ def is_irreducible(poly: Poly) -> bool:
References
----------
* M. O. Rabin. Probabilistic algorithms in finite fields. SIAM Journal on Computing (1980), 273–280. https://apps.dtic.mil/sti/pdfs/ADA078416.pdf
* S. Gao and D. Panarino. Tests and constructions of irreducible polynomials over finite fields. https://www.math.clemson.edu/~sgao/papers/GP97a.pdf
* Rabin, M. Probabilistic algorithms in finite fields. SIAM Journal on Computing (1980), 273–280. https://apps.dtic.mil/sti/pdfs/ADA078416.pdf
* Gao, S. and Panarino, D. Tests and constructions of irreducible polynomials over finite fields. https://www.math.clemson.edu/~sgao/papers/GP97a.pdf
* Section 4.5.1 from https://cacr.uwaterloo.ca/hac/about/chap4.pdf
* https://en.wikipedia.org/wiki/Factorization_of_polynomials_over_finite_fields
Expand Down Expand Up @@ -1240,7 +1240,7 @@ def matlab_primitive_poly(characteristic: int, degree: int) -> Poly:
References
----------
* S. Lin and D. Costello. Error Control Coding. Table 2.7.
* Lin, S. and Costello, D. Error Control Coding. Table 2.7.
Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions galois/_fields/_poly_functions.py
Expand Up @@ -263,7 +263,7 @@ def square_free_factorization(poly: Poly) -> Tuple[List[Poly], List[int]]:
References
----------
* D. Hachenberger, D. Jungnickel. Topics in Galois Fields. Algorithm 6.1.7.
* Hachenberger, D. and Jungnickel, D. Topics in Galois Fields. Algorithm 6.1.7.
* Section 2.1 from https://people.csail.mit.edu/dmoshkov/courses/codes/poly-factorization.pdf
Examples
Expand Down Expand Up @@ -382,7 +382,7 @@ def distinct_degree_factorization(poly: Poly) -> Tuple[List[Poly], List[int]]:
References
----------
* D. Hachenberger, D. Jungnickel. Topics in Galois Fields. Algorithm 6.2.2.
* Hachenberger, D. and Jungnickel, D. Topics in Galois Fields. Algorithm 6.2.2.
* Section 2.2 from https://people.csail.mit.edu/dmoshkov/courses/codes/poly-factorization.pdf
Examples
Expand Down
8 changes: 4 additions & 4 deletions galois/_lfsr.py
Expand Up @@ -242,7 +242,7 @@ class FLFSR(_LFSR):
References
----------
* Gardner, David. 2019. “Applications of the Galois Model LFSR in Cryptography”. figshare. https://hdl.handle.net/2134/21932.
* Gardner, D. 2019. “Applications of the Galois Model LFSR in Cryptography”. figshare. https://hdl.handle.net/2134/21932.
See Also
--------
Expand Down Expand Up @@ -763,7 +763,7 @@ class GLFSR(_LFSR):
References
----------
* Gardner, David. 2019. “Applications of the Galois Model LFSR in Cryptography”. figshare. https://hdl.handle.net/2134/21932.
* Gardner, D. 2019. “Applications of the Galois Model LFSR in Cryptography”. figshare. https://hdl.handle.net/2134/21932.
See Also
--------
Expand Down Expand Up @@ -1279,8 +1279,8 @@ def berlekamp_massey(y, output="minimal"):
References
----------
* Gardner, David. 2019. “Applications of the Galois Model LFSR in Cryptography”. figshare. https://hdl.handle.net/2134/21932.
* Sachs, Jason. Linear Feedback Shift Registers for the Uninitiated, Part VI: Sing Along with the Berlekamp-Massey Algorithm. https://www.embeddedrelated.com/showarticle/1099.php
* Gardner, D. 2019. “Applications of the Galois Model LFSR in Cryptography”. figshare. https://hdl.handle.net/2134/21932.
* Sachs, J. Linear Feedback Shift Registers for the Uninitiated, Part VI: Sing Along with the Berlekamp-Massey Algorithm. https://www.embeddedrelated.com/showarticle/1099.php
* https://crypto.stanford.edu/~mironov/cs359/massey.pdf
Examples
Expand Down
8 changes: 4 additions & 4 deletions galois/_modular.py
Expand Up @@ -446,8 +446,8 @@ def primitive_root(n: int, start: int = 1, stop: Optional[int] = None, method: L
References
----------
* V. Shoup. Searching for primitive roots in finite fields. https://www.ams.org/journals/mcom/1992-58-197/S0025-5718-1992-1106981-9/S0025-5718-1992-1106981-9.pdf
* L. K. Hua. On the least primitive root of a prime. https://www.ams.org/journals/bull/1942-48-10/S0002-9904-1942-07767-6/S0002-9904-1942-07767-6.pdf
* Shoup, V. Searching for primitive roots in finite fields. https://www.ams.org/journals/mcom/1992-58-197/S0025-5718-1992-1106981-9/S0025-5718-1992-1106981-9.pdf
* Hua, L.K. On the least primitive root of a prime. https://www.ams.org/journals/bull/1942-48-10/S0002-9904-1942-07767-6/S0002-9904-1942-07767-6.pdf
* http://www.numbertheory.org/courses/MP313/lectures/lecture7/page1.html
Examples
Expand Down Expand Up @@ -615,8 +615,8 @@ def primitive_roots(n: int, start: int = 1, stop: Optional[int] = None, reverse:
References
----------
* V. Shoup. Searching for primitive roots in finite fields. https://www.ams.org/journals/mcom/1992-58-197/S0025-5718-1992-1106981-9/S0025-5718-1992-1106981-9.pdf
* L. K. Hua. On the least primitive root of a prime. https://www.ams.org/journals/bull/1942-48-10/S0002-9904-1942-07767-6/S0002-9904-1942-07767-6.pdf
* Shoup, V. Searching for primitive roots in finite fields. https://www.ams.org/journals/mcom/1992-58-197/S0025-5718-1992-1106981-9/S0025-5718-1992-1106981-9.pdf
* Hua, L.K. On the least primitive root of a prime. https://www.ams.org/journals/bull/1942-48-10/S0002-9904-1942-07767-6/S0002-9904-1942-07767-6.pdf
* http://www.numbertheory.org/courses/MP313/lectures/lecture7/page1.html
Examples
Expand Down
4 changes: 2 additions & 2 deletions galois/_polymorphic.py
Expand Up @@ -145,7 +145,7 @@ def egcd(a, b):
----------
* Algorithm 2.107 from https://cacr.uwaterloo.ca/hac/about/chap2.pdf
* Algorithm 2.221 from https://cacr.uwaterloo.ca/hac/about/chap2.pdf
* T. Moon, "Error Correction Coding", Section 5.2.2: The Euclidean Algorithm and Euclidean Domains, p. 181
* Moon, T. "Error Correction Coding", Section 5.2.2: The Euclidean Algorithm and Euclidean Domains, p. 181
Examples
--------
Expand Down Expand Up @@ -584,7 +584,7 @@ def factors(value):
References
----------
* D. Hachenberger, D. Jungnickel. Topics in Galois Fields. Algorithm 6.1.7.
* Hachenberger, D. and Jungnickel, D. Topics in Galois Fields. Algorithm 6.1.7.
* Section 2.1 from https://people.csail.mit.edu/dmoshkov/courses/codes/poly-factorization.pdf
Examples
Expand Down
2 changes: 1 addition & 1 deletion tests/codes/test_bch.py
Expand Up @@ -5,7 +5,7 @@
References
----------
* S. Lin and D. Costello. Error Control Coding. Appendix C, pp. 1231.
* Lin, S. and Costello, D. Error Control Coding. Appendix C, pp. 1231.
* https://link.springer.com/content/pdf/bbm%3A978-1-4899-2174-1%2F1.pdf
* https://octave.sourceforge.io/communications/function/bchpoly.html
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/codes/test_bch_valid_codes.py
Expand Up @@ -3,7 +3,7 @@
References
----------
* S. Lin and D. Costello. Error Control Coding. Appendix C, pp. 1231.
* Lin, S. and Costello, D. Error Control Coding. Appendix C, pp. 1231.
* https://link.springer.com/content/pdf/bbm%3A978-1-4899-2174-1%2F1.pdf
"""
import pytest
Expand Down

0 comments on commit bca9e1d

Please sign in to comment.