Add GF2 type for Galois field elements
- add `GF2` class in the `lalib.elements` sub-package implementing a typical Galois field with two elements - the singleton objects `one` and `zero` are the concrete instances of the `GF2` type for the end users - besides the typical Galois arithmetic, `one` and `zero` behave like the built-in numbers `1` and `0` and implement the `numbers.Rational` interface - add exhaustive docstrings with usage examples - add (unit) test cases with 100% coverage
This commit is contained in:
parent
d405c22c90
commit
3cecf0d989
6 changed files with 1381 additions and 1 deletions
|
|
@ -30,6 +30,8 @@ repository = "https://github.com/webartifex/lalib"
|
|||
|
||||
python = "^3.9"
|
||||
|
||||
typing-extensions = [ { python = "<3.11", version = "^4.12" } ] # to support Python 3.9 & 3.10
|
||||
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
|
||||
|
|
@ -127,6 +129,9 @@ exclude_lines = [
|
|||
# "pragma: no cover"
|
||||
# => Intentionally commented out as we thrive for 100% test coverage
|
||||
|
||||
# PyPI's "typing-extensions" are needed to make `mypy` work
|
||||
"pragma: no cover ${PRAGMA_SUPPORT_39_N_310}",
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue