galois v0.3.3
Released February 1, 2023
Changes
- Added a
terms
keyword argument toirreducible_poly()
,irreducible_polys()
,primitive_poly()
, andprimitive_polys()
to find a polynomial with a desired number of non-zero terms. This may be set to an integer or to"min"
. (#463)>>> import galois >>> galois.irreducible_poly(7, 9) Poly(x^9 + 2, GF(7)) >>> galois.irreducible_poly(7, 9, terms=3) Poly(x^9 + x + 1, GF(7)) >>> galois.primitive_poly(7, 9) Poly(x^9 + x^2 + x + 2, GF(7)) >>> galois.primitive_poly(7, 9, terms="min") Poly(x^9 + 3x^2 + 4, GF(7))
- Added a database of binary irreducible polynomials with degrees less than 10,000. These polynomials are lexicographically-first and have the minimum number of non-zero terms. The database is accessed in
irreducible_poly()
whenterms="min"
andmethod="min"
. (#462)In [1]: import galois # Manual search In [2]: %time galois.irreducible_poly(2, 1001) CPU times: user 6.8 s, sys: 0 ns, total: 6.8 s Wall time: 6.81 s Out[2]: Poly(x^1001 + x^5 + x^3 + x + 1, GF(2)) # With the database In [3]: %time galois.irreducible_poly(2, 1001, terms="min") CPU times: user 745 µs, sys: 0 ns, total: 745 µs Wall time: 1.4 ms Out[3]: Poly(x^1001 + x^17 + 1, GF(2))
- Memoized expensive polynomial tests
Poly.is_irreducible()
andPoly.is_primitive()
. Now, the expense of those calculations for a given polynomial is only incurred once. (#470)In [1]: import galois In [2]: f = galois.Poly.Str("x^1001 + x^17 + 1"); f Out[2]: Poly(x^1001 + x^17 + 1, GF(2)) In [3]: %time f.is_irreducible() CPU times: user 1.05 s, sys: 3.47 ms, total: 1.05 s Wall time: 1.06 s Out[3]: True In [4]: %time f.is_irreducible() CPU times: user 57 µs, sys: 30 µs, total: 87 µs Wall time: 68.2 µs Out[4]: True
- Added tests for Conway polynomials
Poly.is_conway()
andPoly.is_conway_consistent()
. (#469) - Added the ability to manually search for a Conway polynomial if it is not found in Frank Luebeck's database, using
conway_poly(p, m, search=True)
. (#469) - Various documentation improvements.
Contributors
- Iyán Méndez Veiga (@iyanmv)
- Matt Hostetter (@mhostetter)
Commits
db0fde5 Add release notes for v0.3.3
1fafb79 Fix formatting
09463a7 Fix pylint errors
bbc4133 Speed up database calls by sharing a connection and cursor
4339f25 Add performance note about the irreducible poly database
0ec2836 Add hyperlink to additional linear algebra methods
f14901b Add hyperlinks in README
be2e401 Make conway_polys.db
only contain non-zero coefficients
b61044a Clean up polynomial LUTs
4177128 Simplify database interfaces
f2cb05a Remove use_database
kwarg from irreducible_poly()
b5eec8f Update method versus property documentation comment
58dcccb Add slow performance warnings for manual Conway poly search
a4d6a5d Add Conway polynomial manual search unit tests
c3bc7b1 Add manual Conway polynomial test and search functions
ff28d97 Clean up recursive function
77f8316 Add unit tests
89d8086 Use IrreduciblePolyDatabase with terms="min"
bf6010b Add irreducible polynomials for GF(2^m)
9153adb Silence erroneous pylint
error
4c61dad Better solution for avoiding circular imports
9485b5d Minor variable name tweak
021ec94 Minor terminology tweak
c2d5d7f Move Lagrange polys to _lagrange.py
e2eee57 Fix type hint
e228261 Preserve intellisense autocompletion and brief docstring of patched Poly
methods
289857a Remove unused imports
0dffee7 Memoize Poly.is_primitive()
9392bd4 Memoize Poly.is_irreducible()
460cec5 Simplify Poly
hash
b2f33f1 Move polynomial search functions into _search.py
4804c08 Move Conway polys to their own module
f174079 Reorganize poly factors methods
9d846e2 Reorganize irreducibility and primitivity tests
1a863ef Sort keywords
ca97968 Organize class items better in docs
b87dd04 Fix docs links to FieldArray.compile()
and FieldArray.repr()
95327a1 Modify slow performance warnings
28a8108 Add performance-related custom admonitions
0068901 Move polynomial deterministic search into _poly.py
534de4e Make search for a random irreducible/primitive polynomial much more efficient
a82c9d0 Move common irreducible/primitive poly functions to _poly.py
4cc9fbc Add a terms="min"
option to irreducible/primitive poly functions
a5344cf Make search for polynomials of fixed-term much more efficient
f4b908e Add terms
kwarg to primitive poly functions
7ab1c02 Add terms
kwarg to irreducible poly functions
44cc214 Parse Google docstring "See Also" sections as if they were NumPy docstring
7b3aed9 Clean up docstrings
100363b Change max line length to 120
41b17f0 Use Google docstrings instead of NumPy docstrings
1c89c5e Add pytest-benchmark
back to [dev]
dependencies
87c8850 Upgrade to Sphinx Immaterial 0.11.2
1d5ffcf Update copyright
7bb4da3 Fix typo in pollard_p1()
docstring