• R/O
  • SSH

Commit

Tags

Frequently used words (click to add to your profile)

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

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


Commit MetaInfo

Revision8afc24c8f8d1045f8bcd53bd700b3e093a6748bf (tree)
Time2019-08-02 08:58:36
AuthorEric Hopper <hopper@omni...>
CommiterEric Hopper

Log Message

Beging making this more like a reusable Python module.

Change Summary

Incremental Difference

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