pyGF2

所属分类:人工智能/神经网络/深度学习
开发工具:Python
文件大小:645KB
下载次数:0
上传日期:2020-06-28 23:39:08
上 传 者dereja2912
说明:  Python galois field programming finite fields

文件列表:
pyGF2\.idea\deployment.xml (766, 2020-01-17)
pyGF2\.idea\inspectionProfiles\profiles_settings.xml (174, 2020-01-17)
pyGF2\.idea\misc.xml (294, 2020-01-17)
pyGF2\.idea\modules.xml (269, 2020-01-17)
pyGF2\.idea\other.xml (239, 2020-01-17)
pyGF2\.idea\pyGF2.iml (450, 2020-01-17)
pyGF2\.idea\vcs.xml (185, 2020-01-17)
pyGF2\.idea\workspace.xml (11137, 2020-01-20)
pyGF2\LICENSE (35823, 2020-01-17)
pyGF2\pyGF2\generic_functions.py (1528, 2020-01-17)
pyGF2\pyGF2\gf2_add.py (1411, 2020-01-17)
pyGF2\pyGF2\gf2_div.py (2443, 2020-01-17)
pyGF2\pyGF2\gf2_inv.py (4347, 2020-01-17)
pyGF2\pyGF2\gf2_mul.py (1086, 2020-01-17)
... ...

# pyGF2 **Optimized Polynomial arithmetic over GF2\[x]**. This module supports polynomial addition **gf2_add**, multiplication **gf2_mul** division **gf2_div** and Extended Euclidean Algorithm **gf2_xgcd**. Polynomials must be represented as ndarrays of **uint8** including zero-valued coefficients. The rightmost array element is assumed to represent the leading coefficient. ---- For example: >>>a =np.array([1, 0, 1, 1], dtype="uint8") ---- It is equivalent to the polynomial *x^3+x^2+1*. In other words the ordering is the same as the one used in MATLAB. Sympy and numpy.polys instead assume the leftmost array element to be the leading coefficient. The use of such ordering allows to use numpy.fft to perform multiplication between polynomials. ---- In general a great effort has been put to speed-up all the operations making this module suitable for handling very large degree (tens of thousands) GF2\[x] polynomials such as the ones required in coding theory. Speed-wise it is orders of magnitude faster for polynomials of large degree when it is compared to both numpy.polys functions and Sympy.galoistools. For Example: - **numpy.polymul** vs **gf2_mul** for two random GF2\[x] polynomial with 100000 elements: **5.63 s vs 105 ms** - **numpy.polydiv** encounters overflow problems when dealing with large polynomials. **gf2_div** solves that by using only modulo 2 operations. - **sympy.galoistools.gf_gcdex** vs **gf2_xgcd** for two random GF2\[x] polynomial with 11083 elements: **2 m 5 s vs 1.29 s** --- ## Requirements : NumPy (tested with NumPy 1.13.3 and Python 3.6.3) ---

近期下载者

相关文件


收藏者