hensel_code 0.2.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codecov.yml +6 -0
- data/CHANGELOG.md +32 -2
- data/Gemfile +2 -2
- data/Gemfile.lock +11 -2
- data/README.md +365 -42
- data/hensel_code.gemspec +39 -0
- data/lib/hensel_code/finite_gadic_expansion.rb +66 -0
- data/lib/hensel_code/finite_padic_expansion.rb +39 -12
- data/lib/hensel_code/gadic_base.rb +86 -0
- data/lib/hensel_code/gadic_verifier.rb +36 -0
- data/lib/hensel_code/modular_arithmetic.rb +75 -0
- data/lib/hensel_code/padic_base.rb +7 -0
- data/lib/hensel_code/polynomial.rb +103 -0
- data/lib/hensel_code/tools.rb +24 -6
- data/lib/hensel_code/truncated_finite_gadic_expansion.rb +65 -0
- data/lib/hensel_code/truncated_finite_padic_expansion.rb +6 -1
- data/lib/hensel_code/version.rb +1 -1
- data/lib/hensel_code.rb +8 -0
- metadata +42 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7109ef429b245037638da445a57e080330889ced172cdbca0402d861618742fe
|
4
|
+
data.tar.gz: f20970c13e3b51a34ebacaf3367072bd62ad45ad4954fa276f5352e65d1b68da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0c8425fd3252229dfa7f837cfacc7a1f0de10afd9e0e5946ee86f7da23fa5ed0c826e2cff02b711834f0d37b8f13ff9c22c7aa71da342efa15e2653789252aa
|
7
|
+
data.tar.gz: e2a24c597c7d3fd415ef3c8ab7fd7eea11ca9ed66fbffff2b8e6055095edc1b29787e3527479a555305918d05f9b58ddea6e0d9ca75a21b8347aa48581bf7062
|
data/.codecov.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,35 @@
|
|
1
|
-
## [
|
1
|
+
## [0.4.0] - 2022-03-29
|
2
|
+
- Add the fourth type of supported Hensel code: the finite-segement g-adic Hensel code.
|
2
3
|
|
3
|
-
## [0.1
|
4
|
+
## [0.3.1] - 2022-03-25
|
5
|
+
- Fix the method `random_distinct_numbers` in `Tools` which was allowing duplicated random numbers.
|
6
|
+
|
7
|
+
## [0.3.0] - 2022-03-12
|
8
|
+
|
9
|
+
- Add the `Polynomial` class for arithmetic with fixed-length polynomials
|
10
|
+
- Change the class `TruncatedFinitePadicExpansion` for carrying all computaitons over fixed-length polynomials reduced modulo `p`
|
11
|
+
- Add the third type of supported Hensel code: the truncated finite-segment g-adic Hensel code.
|
12
|
+
- Add `GAdicBase` as the parent class of `TruncatedFiniteGadicExpansion`.
|
13
|
+
- Allow converting a finite-segment p-adic Hensel code into a truncated p-adic Hensel code.
|
14
|
+
- Add the Chinese Remainder Theorem algorithm (CRT) to the module `Tools`
|
15
|
+
- Improve helpers for generating distinct random numbers (integers, primes, and rationals)
|
16
|
+
- Add the inverse function for all three currently supported types of Hensel codes
|
17
|
+
- Overall improvements in the code
|
18
|
+
|
19
|
+
## [0.2.1] - 2022-03-05
|
20
|
+
- Fix version build
|
21
|
+
|
22
|
+
## [0.2.0] - 2022-03-05
|
23
|
+
|
24
|
+
- Add the second type of supported Hensel code: the finite-segment p-adic Hensel code.
|
25
|
+
- Allow converting a finite-segment p-adic Hensel code into a truncated p-adic Hensel code.
|
26
|
+
- Support all four arithemtic operations.
|
27
|
+
- Add `PAdicBase` as the parent class of `FinitePadicExpansion` and `TruncatedFinitePadicExpansion`.
|
28
|
+
|
29
|
+
|
30
|
+
## [0.1.0] - 2022-03-03
|
4
31
|
|
5
32
|
- Initial release
|
33
|
+
- Contain general tools for integer manipulation such us random number generation, random integer generation, extended gcd, and modular multiplicative inverse.
|
34
|
+
- Add the first type of supported Hensel code: the truncated finite-segment p-adic expansion Hensel code or simply truncated p-adic Hensel code.
|
35
|
+
- Allow encoding rational numbers with the classs `TruncatedFinitePadicExpansion` and perform all four basic arithmetic operations on truncated p-adic Hensel codes: addition, subtraction, multiplication, and division.
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
hensel_code (0.
|
4
|
+
hensel_code (0.3.1)
|
5
|
+
openssl (~> 3.0.0)
|
6
|
+
prime (~> 0.1.2)
|
5
7
|
|
6
8
|
GEM
|
7
9
|
remote: https://rubygems.org/
|
@@ -19,6 +21,7 @@ GEM
|
|
19
21
|
builder
|
20
22
|
minitest (>= 5.0)
|
21
23
|
ruby-progressbar
|
24
|
+
openssl (3.0.0)
|
22
25
|
parallel (1.21.0)
|
23
26
|
parser (3.1.1.0)
|
24
27
|
ast (~> 2.4.1)
|
@@ -49,9 +52,15 @@ GEM
|
|
49
52
|
docile (~> 1.1)
|
50
53
|
simplecov-html (~> 0.11)
|
51
54
|
simplecov_json_formatter (~> 0.1)
|
55
|
+
simplecov-console (0.9.1)
|
56
|
+
ansi
|
57
|
+
simplecov
|
58
|
+
terminal-table
|
52
59
|
simplecov-html (0.12.3)
|
53
60
|
simplecov_json_formatter (0.1.4)
|
54
61
|
singleton (0.1.1)
|
62
|
+
terminal-table (3.0.2)
|
63
|
+
unicode-display_width (>= 1.1.1, < 3)
|
55
64
|
unicode-display_width (2.1.0)
|
56
65
|
|
57
66
|
PLATFORMS
|
@@ -63,11 +72,11 @@ DEPENDENCIES
|
|
63
72
|
hensel_code!
|
64
73
|
minitest (~> 5.0)
|
65
74
|
minitest-reporters (~> 1.5)
|
66
|
-
prime (~> 0.1.2)
|
67
75
|
rake (~> 13.0)
|
68
76
|
rubocop (~> 1.21)
|
69
77
|
rubocop-minitest (~> 0.17.2)
|
70
78
|
rubocop-rake (~> 0.6)
|
79
|
+
simplecov-console (~> 0.9)
|
71
80
|
|
72
81
|
BUNDLED WITH
|
73
82
|
2.3.8
|