Skip to content

galois v0.0.27

Compare
Choose a tag to compare
@github-actions github-actions released this 22 Apr 19:51
· 0 commits to db5c3122d8beac60e345b89a9cd89bce11454b7a since this release

Released April 22, 2022

Breaking Changes

  • Sunsetted support for Python 3.6. This was necessary to support forward references with from __future__ import annotations (available in Python 3.7+). That import is required to support the type aliases in the new galois.typing subpackage. (#339)
  • Removed the FieldClass metaclass from the public API. It was previously included due to an inability of Sphinx to document class properties. In this release, we monkey patched Sphinx to document all classmethods, class properties, and instance methods in FieldArray itself. (#343)
    • Use issubclass(GF, galois.FieldArray) anywhere isinstance(GF, galois.FieldClass) was previously used.
    • Annotate with Type[galois.FieldArray] anywhere galois.FieldClass was previously used.

Changes

  • Added the galois.typing subpackage, similar to np.typing. It contains type hints for common coercible data types used throughout the library, including ElementLike, ArrayLike, and PolyLike. With these type hints, the annotations are simpler and more clear. (#339)
  • Modified functions to accept coercible data types wherever possible. For example, functions now accept PolyLike objects instead of strictly Poly instances. (#339)
  • Added Array which is an abstract base class of FieldArray (and RingArray in a future release). (#336)
  • Added support for the DFT over any finite field using np.fft.fft() and np.fft.ifft(). (#335)
    >>> x
    GF([127, 191,  69,  35, 221, 242, 193, 108,  72, 102,  80, 163,  13,  74,
        218, 159, 207,  12, 159, 129,  92,  71], order=3^5)
    >>> X = np.fft.fft(x); X
    GF([ 16,  17,  20, 137,  58, 166, 178,  52,  19, 109, 115,  93,  99, 214,
        187, 235, 195,  96, 232,  45, 241,  24], order=3^5)
    >>> np.fft.ifft(X)
    GF([127, 191,  69,  35, 221, 242, 193, 108,  72, 102,  80, 163,  13,  74,
        218, 159, 207,  12, 159, 129,  92,  71], order=3^5)
  • Implemented the Cooley-Tukey radix-2 $O(N\ \textrm{log}(N))$ algorithm for the NTT and JIT compiled it. (#333)
    In [2]: x = list(range(1, 1024 + 1))
    
    # v0.0.26
    In [4]: %timeit X = galois.ntt(x)
    5.2 ms ± 121 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
    
    # v0.0.27
    In [4]: %timeit X = galois.ntt(x)
    695 µs ± 4.56 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
  • Added the FieldArray.primitive_root_of_unity() classmethod. (#333)
    >>> GF = galois.GF(3**5)
    >>> GF.primitive_root_of_unity(22)
    GF(39, order=3^5)
  • Added the FieldArray.primitive_roots_of_unity() classmethod. (#333)
    >>> GF = galois.GF(3**5)
    >>> GF.primitive_roots_of_unity(22)
    GF([ 14,  39,  44,  59, 109, 114, 136, 200, 206, 226], order=3^5)
  • Made 0-th degree coefficients more differentiated when using the polynomial element representation. (#328)
    # v0.0.26
    >>> print(f)
    (α^2 + α + 1)x^4 + (α^3)x + α^3 + 2α^2 + 2α + 2
    # v0.0.27
    >>> print(f)
    (α^2 + α + 1)x^4 + (α^3)x + (α^3 + 2α^2 + 2α + 2)
  • Restructured code base for clarity. (#336)
  • Fixed display of overloaded functions in API reference. (#337)
  • Fixed broken "References" sections in API reference. (#281)
  • Fixed other small bugs.

Contributors

Commits

2284442 Version bump to 0.0.27
db5c312 Add release notes for v0.0.27
f5376fd Monkey-patch class properties in conf.py
e3d7029 Clean-up .. math:: directives
d00abbc Hide Array and GF2 inherited methods and properties
98c2272 Update README
d036af6 Remove metaclasses from API
7a3a2e6 Replace recommonmark with myst-parser
429a920 Fix error in ElementLike type hint
1e23c36 Use short object references in docs
96376b9 Add galois.typing subpackage and simplify type hints
f08101e Remove support for Python 3.6
c2766b7 Differentiate Reed-Solomon repr() and str()
6046729 Differentiate BCH repr() and str()
da5c8c9 Remove numba from inter-Sphinx mapping
0c34f4f Fix bug in Poly.degree when poly was zero
a76c9f3 Simplify private function names
2f8c905 Fix improper circular import
4a8f34e Display overloaded signatures in docs
7259161 Move irreducible/primitve poly and primitive element functions into _polys/ folder
de87b1f Rename FieldClass to FieldArrayClass
b2a28fc Restructure polynomial code
630e638 Restructure code and import hierarchy
5d8d29e Update docs to add info about the FFT
1435b22 Add unit tests for the FFT over arbitrary fields
e80d1b3 Support the DFT over any finite field
16544b9 Fix FFT recursion for non-compiled case
fcd7c97 Properly set module for pollard_rho()
42217c8 Do not expose LRU cache wrappers in public API
0719969 Implement the radix-2 Cooley-Tukey FFT algorithm
ab58cde JIT compile the O(N^2) NTT
d5f9e94 Remove pylint pin before v2.13.0
8ae0848 Cached primitive elements are calculation
481b09f Clean-up class private attributes
29281f9 Add FieldClass.primitive_roots_of_unity()
01fe13c Add FieldClass.primitve_root_of_unity()
592da2c Update Google Analytics config of sphinx-immaterial
9587e30 Fix "References" sections in docstrings
05b2e4e Add social links to bottom of webpage
995b76b Add Jupyter notebook checkpoints to gitignore
d4739e3 Add virtual environments to gitignore
303418b Add () around 0-degree coefficient if it has a + separator
5f011ae Fix percentages in release notes for v0.0.26