passagemath-ntl 10.6.33__cp313-cp313-musllinux_1_2_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of passagemath-ntl might be problematic. Click here for more details.

Files changed (163) hide show
  1. passagemath_ntl-10.6.33.dist-info/METADATA +122 -0
  2. passagemath_ntl-10.6.33.dist-info/RECORD +163 -0
  3. passagemath_ntl-10.6.33.dist-info/WHEEL +5 -0
  4. passagemath_ntl-10.6.33.dist-info/top_level.txt +2 -0
  5. passagemath_ntl.libs/libgcc_s-0cd532bd.so.1 +0 -0
  6. passagemath_ntl.libs/libgf2x-9e30c3e3.so.3.0.0 +0 -0
  7. passagemath_ntl.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
  8. passagemath_ntl.libs/libmpfi-2153e8c2.so.0.0.0 +0 -0
  9. passagemath_ntl.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
  10. passagemath_ntl.libs/libntl-26885ca2.so.44.0.1 +0 -0
  11. passagemath_ntl.libs/libstdc++-5d72f927.so.6.0.33 +0 -0
  12. sage/all__sagemath_ntl.py +7 -0
  13. sage/libs/all__sagemath_ntl.py +3 -0
  14. sage/libs/mpfi/__init__.pxd +287 -0
  15. sage/libs/mpfi/types.pxd +10 -0
  16. sage/libs/ntl/GF2.pxd +18 -0
  17. sage/libs/ntl/GF2E.pxd +28 -0
  18. sage/libs/ntl/GF2EX.pxd +12 -0
  19. sage/libs/ntl/GF2X.pxd +81 -0
  20. sage/libs/ntl/ZZ.pxd +93 -0
  21. sage/libs/ntl/ZZX.pxd +85 -0
  22. sage/libs/ntl/ZZ_p.pxd +28 -0
  23. sage/libs/ntl/ZZ_pE.pxd +37 -0
  24. sage/libs/ntl/ZZ_pEX.pxd +106 -0
  25. sage/libs/ntl/ZZ_pX.pxd +122 -0
  26. sage/libs/ntl/__init__.py +4 -0
  27. sage/libs/ntl/all.py +72 -0
  28. sage/libs/ntl/conversion.pxd +106 -0
  29. sage/libs/ntl/convert.cpython-313-x86_64-linux-musl.so +0 -0
  30. sage/libs/ntl/convert.pxd +7 -0
  31. sage/libs/ntl/convert.pyx +38 -0
  32. sage/libs/ntl/decl.pxi +18 -0
  33. sage/libs/ntl/error.cpython-313-x86_64-linux-musl.so +0 -0
  34. sage/libs/ntl/error.pyx +63 -0
  35. sage/libs/ntl/lzz_p.pxd +20 -0
  36. sage/libs/ntl/lzz_pX.pxd +59 -0
  37. sage/libs/ntl/mat_GF2.pxd +30 -0
  38. sage/libs/ntl/mat_GF2E.pxd +30 -0
  39. sage/libs/ntl/mat_ZZ.pxd +59 -0
  40. sage/libs/ntl/misc.pxi +33 -0
  41. sage/libs/ntl/ntl_GF2.cpython-313-x86_64-linux-musl.so +0 -0
  42. sage/libs/ntl/ntl_GF2.pxd +5 -0
  43. sage/libs/ntl/ntl_GF2.pyx +281 -0
  44. sage/libs/ntl/ntl_GF2E.cpython-313-x86_64-linux-musl.so +0 -0
  45. sage/libs/ntl/ntl_GF2E.pxd +8 -0
  46. sage/libs/ntl/ntl_GF2E.pyx +488 -0
  47. sage/libs/ntl/ntl_GF2EContext.cpython-313-x86_64-linux-musl.so +0 -0
  48. sage/libs/ntl/ntl_GF2EContext.pxd +9 -0
  49. sage/libs/ntl/ntl_GF2EContext.pyx +134 -0
  50. sage/libs/ntl/ntl_GF2EX.cpython-313-x86_64-linux-musl.so +0 -0
  51. sage/libs/ntl/ntl_GF2EX.pxd +10 -0
  52. sage/libs/ntl/ntl_GF2EX.pyx +251 -0
  53. sage/libs/ntl/ntl_GF2X.cpython-313-x86_64-linux-musl.so +0 -0
  54. sage/libs/ntl/ntl_GF2X.pxd +5 -0
  55. sage/libs/ntl/ntl_GF2X.pyx +771 -0
  56. sage/libs/ntl/ntl_GF2X_linkage.pxi +404 -0
  57. sage/libs/ntl/ntl_ZZ.cpython-313-x86_64-linux-musl.so +0 -0
  58. sage/libs/ntl/ntl_ZZ.pxd +7 -0
  59. sage/libs/ntl/ntl_ZZ.pyx +541 -0
  60. sage/libs/ntl/ntl_ZZX.cpython-313-x86_64-linux-musl.so +0 -0
  61. sage/libs/ntl/ntl_ZZX.pxd +7 -0
  62. sage/libs/ntl/ntl_ZZX.pyx +1206 -0
  63. sage/libs/ntl/ntl_ZZ_p.cpython-313-x86_64-linux-musl.so +0 -0
  64. sage/libs/ntl/ntl_ZZ_p.pxd +10 -0
  65. sage/libs/ntl/ntl_ZZ_p.pyx +509 -0
  66. sage/libs/ntl/ntl_ZZ_pContext.cpython-313-x86_64-linux-musl.so +0 -0
  67. sage/libs/ntl/ntl_ZZ_pContext.pxd +22 -0
  68. sage/libs/ntl/ntl_ZZ_pContext.pyx +201 -0
  69. sage/libs/ntl/ntl_ZZ_pE.cpython-313-x86_64-linux-musl.so +0 -0
  70. sage/libs/ntl/ntl_ZZ_pE.pxd +11 -0
  71. sage/libs/ntl/ntl_ZZ_pE.pyx +349 -0
  72. sage/libs/ntl/ntl_ZZ_pEContext.cpython-313-x86_64-linux-musl.so +0 -0
  73. sage/libs/ntl/ntl_ZZ_pEContext.pxd +23 -0
  74. sage/libs/ntl/ntl_ZZ_pEContext.pyx +226 -0
  75. sage/libs/ntl/ntl_ZZ_pEX.cpython-313-x86_64-linux-musl.so +0 -0
  76. sage/libs/ntl/ntl_ZZ_pEX.pxd +10 -0
  77. sage/libs/ntl/ntl_ZZ_pEX.pyx +1255 -0
  78. sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi +420 -0
  79. sage/libs/ntl/ntl_ZZ_pX.cpython-313-x86_64-linux-musl.so +0 -0
  80. sage/libs/ntl/ntl_ZZ_pX.pxd +17 -0
  81. sage/libs/ntl/ntl_ZZ_pX.pyx +1532 -0
  82. sage/libs/ntl/ntl_lzz_p.cpython-313-x86_64-linux-musl.so +0 -0
  83. sage/libs/ntl/ntl_lzz_p.pxd +8 -0
  84. sage/libs/ntl/ntl_lzz_p.pyx +440 -0
  85. sage/libs/ntl/ntl_lzz_pContext.cpython-313-x86_64-linux-musl.so +0 -0
  86. sage/libs/ntl/ntl_lzz_pContext.pxd +7 -0
  87. sage/libs/ntl/ntl_lzz_pContext.pyx +137 -0
  88. sage/libs/ntl/ntl_lzz_pX.cpython-313-x86_64-linux-musl.so +0 -0
  89. sage/libs/ntl/ntl_lzz_pX.pxd +10 -0
  90. sage/libs/ntl/ntl_lzz_pX.pyx +902 -0
  91. sage/libs/ntl/ntl_mat_GF2.cpython-313-x86_64-linux-musl.so +0 -0
  92. sage/libs/ntl/ntl_mat_GF2.pxd +8 -0
  93. sage/libs/ntl/ntl_mat_GF2.pyx +612 -0
  94. sage/libs/ntl/ntl_mat_GF2E.cpython-313-x86_64-linux-musl.so +0 -0
  95. sage/libs/ntl/ntl_mat_GF2E.pxd +10 -0
  96. sage/libs/ntl/ntl_mat_GF2E.pyx +752 -0
  97. sage/libs/ntl/ntl_mat_ZZ.cpython-313-x86_64-linux-musl.so +0 -0
  98. sage/libs/ntl/ntl_mat_ZZ.pxd +6 -0
  99. sage/libs/ntl/ntl_mat_ZZ.pyx +1523 -0
  100. sage/libs/ntl/ntl_tools.pxd +3 -0
  101. sage/libs/ntl/ntlwrap.h +53 -0
  102. sage/libs/ntl/ntlwrap_impl.h +743 -0
  103. sage/libs/ntl/types.pxd +157 -0
  104. sage/libs/ntl/vec_GF2.pxd +26 -0
  105. sage/libs/ntl/vec_GF2E.pxd +2 -0
  106. sage/matrix/all__sagemath_ntl.py +1 -0
  107. sage/matrix/matrix_modn_dense_double.pxd +10 -0
  108. sage/matrix/matrix_modn_dense_float.pxd +9 -0
  109. sage/matrix/matrix_modn_dense_template.pxi +3257 -0
  110. sage/matrix/matrix_modn_dense_template_header.pxi +15 -0
  111. sage/matrix/matrix_modn_sparse.pxd +8 -0
  112. sage/misc/all__sagemath_ntl.py +1 -0
  113. sage/rings/all__sagemath_ntl.py +7 -0
  114. sage/rings/bernmm.cpython-313-x86_64-linux-musl.so +0 -0
  115. sage/rings/bernmm.pyx +161 -0
  116. sage/rings/bernoulli_mod_p.cpython-313-x86_64-linux-musl.so +0 -0
  117. sage/rings/bernoulli_mod_p.pyx +313 -0
  118. sage/rings/finite_rings/all__sagemath_ntl.py +1 -0
  119. sage/rings/finite_rings/finite_field_ntl_gf2e.py +305 -0
  120. sage/rings/finite_rings/residue_field_ntl_gf2e.cpython-313-x86_64-linux-musl.so +0 -0
  121. sage/rings/finite_rings/residue_field_ntl_gf2e.pyx +140 -0
  122. sage/rings/padics/all__sagemath_ntl.py +5 -0
  123. sage/rings/padics/padic_ZZ_pX_CA_element.cpython-313-x86_64-linux-musl.so +0 -0
  124. sage/rings/padics/padic_ZZ_pX_CA_element.pxd +25 -0
  125. sage/rings/padics/padic_ZZ_pX_CA_element.pyx +2368 -0
  126. sage/rings/padics/padic_ZZ_pX_CR_element.cpython-313-x86_64-linux-musl.so +0 -0
  127. sage/rings/padics/padic_ZZ_pX_CR_element.pxd +33 -0
  128. sage/rings/padics/padic_ZZ_pX_CR_element.pyx +3277 -0
  129. sage/rings/padics/padic_ZZ_pX_FM_element.cpython-313-x86_64-linux-musl.so +0 -0
  130. sage/rings/padics/padic_ZZ_pX_FM_element.pxd +12 -0
  131. sage/rings/padics/padic_ZZ_pX_FM_element.pyx +1739 -0
  132. sage/rings/padics/padic_ZZ_pX_element.cpython-313-x86_64-linux-musl.so +0 -0
  133. sage/rings/padics/padic_ZZ_pX_element.pxd +6 -0
  134. sage/rings/padics/padic_ZZ_pX_element.pyx +919 -0
  135. sage/rings/padics/padic_ext_element.cpython-313-x86_64-linux-musl.so +0 -0
  136. sage/rings/padics/padic_ext_element.pxd +38 -0
  137. sage/rings/padics/padic_ext_element.pyx +512 -0
  138. sage/rings/padics/pow_computer_ext.cpython-313-x86_64-linux-musl.so +0 -0
  139. sage/rings/padics/pow_computer_ext.pxd +107 -0
  140. sage/rings/padics/pow_computer_ext.pyx +2401 -0
  141. sage/rings/polynomial/all__sagemath_ntl.py +1 -0
  142. sage/rings/polynomial/evaluation_ntl.cpython-313-x86_64-linux-musl.so +0 -0
  143. sage/rings/polynomial/evaluation_ntl.pxd +7 -0
  144. sage/rings/polynomial/evaluation_ntl.pyx +70 -0
  145. sage/rings/polynomial/polynomial_gf2x.cpython-313-x86_64-linux-musl.so +0 -0
  146. sage/rings/polynomial/polynomial_gf2x.pxd +10 -0
  147. sage/rings/polynomial/polynomial_gf2x.pyx +364 -0
  148. sage/rings/polynomial/polynomial_integer_dense_ntl.cpython-313-x86_64-linux-musl.so +0 -0
  149. sage/rings/polynomial/polynomial_integer_dense_ntl.pxd +8 -0
  150. sage/rings/polynomial/polynomial_integer_dense_ntl.pyx +1128 -0
  151. sage/rings/polynomial/polynomial_modn_dense_ntl.cpython-313-x86_64-linux-musl.so +0 -0
  152. sage/rings/polynomial/polynomial_modn_dense_ntl.pxd +36 -0
  153. sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +2049 -0
  154. sage/rings/polynomial/polynomial_template.pxi +842 -0
  155. sage/rings/polynomial/polynomial_template_header.pxi +11 -0
  156. sage/rings/polynomial/polynomial_zz_pex.cpython-313-x86_64-linux-musl.so +0 -0
  157. sage/rings/polynomial/polynomial_zz_pex.pxd +12 -0
  158. sage/rings/polynomial/polynomial_zz_pex.pyx +778 -0
  159. sage/rings/real_mpfi.pxd +50 -0
  160. sage/schemes/all__sagemath_ntl.py +1 -0
  161. sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py +1 -0
  162. sage/schemes/hyperelliptic_curves/hypellfrob.cpython-313-x86_64-linux-musl.so +0 -0
  163. sage/schemes/hyperelliptic_curves/hypellfrob.pyx +252 -0
@@ -0,0 +1,226 @@
1
+ # sage_setup: distribution = sagemath-ntl
2
+ # distutils: libraries = NTL_LIBRARIES gmp M_LIBRARIES
3
+ # distutils: extra_compile_args = NTL_CFLAGS
4
+ # distutils: include_dirs = NTL_INCDIR
5
+ # distutils: library_dirs = NTL_LIBDIR
6
+ # distutils: extra_link_args = NTL_LIBEXTRA
7
+ # distutils: language = c++
8
+
9
+ #*****************************************************************************
10
+ # Copyright (C) 2005 William Stein <wstein@gmail.com>
11
+ #
12
+ # Distributed under the terms of the GNU General Public License (GPL)
13
+ #
14
+ # This code is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
+ # General Public License for more details.
18
+ #
19
+ # The full text of the GPL is available at:
20
+ #
21
+ # https://www.gnu.org/licenses/
22
+ #*****************************************************************************
23
+
24
+ include 'misc.pxi'
25
+ include 'decl.pxi'
26
+
27
+ from sage.ext.cplusplus cimport ccrepr
28
+ from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX
29
+
30
+
31
+ ZZ_pEContextDict = {}
32
+
33
+
34
+ cdef class ntl_ZZ_pEContext_class():
35
+ def __init__(self, ntl_ZZ_pX f):
36
+ """
37
+ EXAMPLES:
38
+
39
+ You can construct contexts manually::
40
+
41
+ sage: c=ntl.ZZ_pEContext(ntl.ZZ_pX([4,1,6],25))
42
+ sage: n1=c.ZZ_pE([10,17,12])
43
+ sage: n1
44
+ [2 15]
45
+
46
+ Or you can construct contexts implicitly::
47
+
48
+ sage: n2=ntl.ZZ_pE(12, ntl.ZZ_pX([1,1,1],7))
49
+ sage: n2
50
+ [5]
51
+ sage: n2+n1 # Mismatched moduli: It will go BOOM!
52
+ Traceback (most recent call last):
53
+ ...
54
+ ValueError: You cannot perform arithmetic with elements of different moduli.
55
+ """
56
+ pass
57
+
58
+ def __cinit__(self, ntl_ZZ_pX f):
59
+ self.pc = f.c
60
+ self.pc.restore_c()
61
+ self.x = ZZ_pEContext_c(f.x)
62
+ ZZ_pEContextDict[(repr(f), repr(f.c.p))] = self
63
+ self.f = f
64
+ self.ptrs.zzpc = &(self.pc.x)
65
+ self.ptrs.zzpec = &(self.x)
66
+
67
+ def __reduce__(self):
68
+ """
69
+ EXAMPLES::
70
+
71
+ sage: c=ntl.ZZ_pEContext(ntl.ZZ_pX([1,1,1],7))
72
+ sage: loads(dumps(c)) is c
73
+ True
74
+ """
75
+ return ntl_ZZ_pEContext, (self.f,)
76
+
77
+ def __repr__(self) -> str:
78
+ """
79
+ Return a string representation of ``self``.
80
+
81
+ EXAMPLES::
82
+
83
+ sage: c = ntl.ZZ_pEContext(ntl.ZZ_pX([1,1,1], 7)); c
84
+ NTL modulus [1 1 1] (mod 7)
85
+ """
86
+ return "NTL modulus %s (mod %s)" % (self.f, self.pc.p)
87
+
88
+ def get_pc(self):
89
+ """
90
+ Return the ZZ_pContext contained within ``self``.
91
+
92
+ EXAMPLES::
93
+
94
+ sage: c = ntl.ZZ_pEContext(ntl.ZZ_pX([1,1,1], 7)); c
95
+ NTL modulus [1 1 1] (mod 7)
96
+ sage: c.get_pc()
97
+ NTL modulus 7
98
+ """
99
+ return self.pc
100
+
101
+ def polynomial(self):
102
+ """
103
+ Return the ZZ_pX polynomial defining ``self``.
104
+
105
+ EXAMPLES::
106
+
107
+ sage: c = ntl.ZZ_pEContext(ntl.ZZ_pX([1,1,1], 7))
108
+ sage: c.polynomial()
109
+ [1 1 1]
110
+ """
111
+ return self.f
112
+
113
+ def restore(self):
114
+ """
115
+ Manually set the global NTL modulus to be ``self``.
116
+
117
+ This should be done automatically by all of the NTL wrapper classes.
118
+
119
+ CRUCIAL: If you are writing your own classes that use ZZ_p_c, ZZ_pX_c, ZZ_pE_c, ZZ_pEX_c
120
+ then you MUST restore the context before calling off to NTL for anything. If the context has been
121
+ switched by other code then behavior of operations is undefined. See the NTL documentation for
122
+ more details (or the wrappers in sage.libs.ntl)
123
+ """
124
+ self.restore_c()
125
+
126
+ cdef void restore_c(self) noexcept:
127
+ """
128
+ Set the global NTL modulus to be ``self``.
129
+
130
+ CRUCIAL: If you are writing your own classes that use ZZ_p_c, ZZ_pX_c, ZZ_pE_c, ZZ_pEX_c
131
+ then you MUST restore the context before calling off to NTL for anything. If the context has been
132
+ switched by other code then behavior of operations is undefined. See the NTL documentation for
133
+ more details (or the wrappers in sage.libs.ntl)
134
+ """
135
+ self.pc.restore_c()
136
+ self.x.restore()
137
+
138
+ #def ZZ_pX(self, v=None):
139
+ # from ntl_ZZ_pX import ntl_ZZ_pX
140
+ # return ntl_ZZ_pX(v,modulus=self)
141
+
142
+ def ZZ_pE(self, v=None):
143
+ """
144
+ Return a ZZ_pE object with modulus ``self`` out of the data v.
145
+
146
+ EXAMPLES::
147
+
148
+ sage: c = ntl.ZZ_pEContext(ntl.ZZ_pX([1,1,1], 7))
149
+ sage: c.ZZ_pE([4,3])
150
+ [4 3]
151
+ """
152
+ from sage.libs.ntl.ntl_ZZ_pE import ntl_ZZ_pE
153
+ return ntl_ZZ_pE(v,modulus=self)
154
+
155
+ def ZZ_pEX(self, v=None):
156
+ """
157
+ Return a ZZ_pE object with modulus ``self`` out of the data v.
158
+
159
+ EXAMPLES::
160
+
161
+ sage: c = ntl.ZZ_pEContext(ntl.ZZ_pX([1,1,1], 7))
162
+ sage: c.ZZ_pEX([4,3])
163
+ [[4] [3]]
164
+ """
165
+ from sage.libs.ntl.ntl_ZZ_pEX import ntl_ZZ_pEX
166
+ return ntl_ZZ_pEX(v, modulus=self)
167
+
168
+ cpdef void _assert_is_current_modulus(self) except *:
169
+ """
170
+ Assert that this is currently-set NTL modulus.
171
+
172
+ Mostly for debugging purposes. If false, an assertion is raised. This method
173
+ segfaults if the NTL modulus has never been set before.
174
+
175
+ EXAMPLES::
176
+
177
+ sage: c1 = ntl.ZZ_pEContext(ntl.ZZ_pX([1,1,1], 5))
178
+ sage: c2 = ntl.ZZ_pEContext(ntl.ZZ_pX([1,2,1], 5))
179
+ sage: c1.restore()
180
+ sage: c1._assert_is_current_modulus()
181
+ sage: c2._assert_is_current_modulus()
182
+ Traceback (most recent call last):
183
+ ...
184
+ AssertionError: modulus mismatch: [1 2 1] != [1 1 1]
185
+ sage: c2.restore()
186
+ sage: c1._assert_is_current_modulus()
187
+ Traceback (most recent call last):
188
+ ...
189
+ AssertionError: modulus mismatch: [1 1 1] != [1 2 1]
190
+ sage: c2._assert_is_current_modulus()
191
+ sage: ntl.ZZ_pContext(3).restore()
192
+ sage: c1._assert_is_current_modulus()
193
+ Traceback (most recent call last):
194
+ ...
195
+ AssertionError: modulus mismatch: 5 != 3
196
+ sage: c2._assert_is_current_modulus()
197
+ Traceback (most recent call last):
198
+ ...
199
+ AssertionError: modulus mismatch: 5 != 3
200
+ """
201
+ self.pc._assert_is_current_modulus()
202
+ if self.f.x == ZZ_pE_current_modulus().val():
203
+ return
204
+ raise AssertionError('modulus mismatch: {} != {}'.format(
205
+ ccrepr(self.f.x),
206
+ ccrepr(ZZ_pE_current_modulus().val())))
207
+
208
+
209
+ def ntl_ZZ_pEContext( ntl_ZZ_pX f):
210
+ """
211
+ Create an ntl_ZZ_pEContext.
212
+
213
+ Such an object must be created before any ZZ_pE or ZZ_pEX objects can be used.
214
+
215
+ The context handling should be taken care of by the wrapper classes.
216
+
217
+ EXAMPLES::
218
+
219
+ sage: c = ntl.ZZ_pEContext(ntl.ZZ_pX([1,1,1], 7)); c
220
+ NTL modulus [1 1 1] (mod 7)
221
+ """
222
+ try:
223
+ return ZZ_pEContextDict[repr(f), repr(f.c.p)]
224
+ except KeyError:
225
+ # Creating the following object caches it.
226
+ return ntl_ZZ_pEContext_class(f)
@@ -0,0 +1,10 @@
1
+ # sage_setup: distribution = sagemath-ntl
2
+ from sage.libs.ntl.types cimport ZZ_pEX_c
3
+ from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class
4
+
5
+ cdef class ntl_ZZ_pEX():
6
+ cdef ZZ_pEX_c x
7
+ cdef ntl_ZZ_pEContext_class c
8
+ #cdef void setitem_from_int(ntl_ZZ_pX self, long i, int value)
9
+ #cdef int getitem_as_int(ntl_ZZ_pX self, long i)
10
+ cdef ntl_ZZ_pEX _new(self)