• R/O
  • SSH

コミット

タグ

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A small kernel of code for playing with Galois fields of arbitrary characteristic


コミットメタ情報

リビジョン8afc24c8f8d1045f8bcd53bd700b3e093a6748bf (tree)
日時2019-08-02 08:58:36
作者Eric Hopper <hopper@omni...>
コミッターEric Hopper

ログメッセージ

Beging making this more like a reusable Python module.

変更サマリ

差分

diff -r ef5953b8a8d2 -r 8afc24c8f8d1 gf.py
--- a/gf.py Wed Jul 31 22:34:22 2019 -0700
+++ b/gf.py Thu Aug 01 16:58:36 2019 -0700
@@ -6,6 +6,16 @@
66 _fieldTypes = {}
77
88 def gfMeta(prime_, basis_):
9+ """Use this to create a class representing a Galois extension field.
10+
11+ prime is the first argument and is the characteristic, Every
12+ polynomial coefficient in the extension field will be a member of
13+ Zprime (integers modulo prime)
14+
15+ basis is the irreducible polynomial that defines the extension
16+ field. It's degree is one larger than the degree of any member of
17+ the field.
18+ """
919 global _fieldTypes
1020 prime_ = int(prime_)
1121 basis_ = tuple((int(p) for p in basis_))
diff -r ef5953b8a8d2 -r 8afc24c8f8d1 lagrange.py
--- a/lagrange.py Wed Jul 31 22:34:22 2019 -0700
+++ b/lagrange.py Thu Aug 01 16:58:36 2019 -0700
@@ -1,4 +1,4 @@
1-import polyops
1+from . import polyops
22 import fractions
33 from functools import reduce
44