passagemath-linbox 10.6.43__cp313-cp313-macosx_13_0_arm64.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.
Files changed (75) hide show
  1. passagemath_linbox/.dylibs/libfflas.1.dylib +0 -0
  2. passagemath_linbox/.dylibs/libffpack.1.dylib +0 -0
  3. passagemath_linbox/.dylibs/libflint.22.0.dylib +0 -0
  4. passagemath_linbox/.dylibs/libgd.3.dylib +0 -0
  5. passagemath_linbox/.dylibs/libgfortran.5.dylib +0 -0
  6. passagemath_linbox/.dylibs/libgivaro.9.dylib +0 -0
  7. passagemath_linbox/.dylibs/libgmp.10.dylib +0 -0
  8. passagemath_linbox/.dylibs/libgmpxx.4.dylib +0 -0
  9. passagemath_linbox/.dylibs/libiml.0.dylib +0 -0
  10. passagemath_linbox/.dylibs/liblinbox.0.dylib +0 -0
  11. passagemath_linbox/.dylibs/libm4ri.1.dylib +0 -0
  12. passagemath_linbox/.dylibs/libm4rie.1.dylib +0 -0
  13. passagemath_linbox/.dylibs/libmpfr.6.dylib +0 -0
  14. passagemath_linbox/.dylibs/libopenblasp-r0.3.29.dylib +0 -0
  15. passagemath_linbox/.dylibs/libpng16.16.dylib +0 -0
  16. passagemath_linbox/.dylibs/libquadmath.0.dylib +0 -0
  17. passagemath_linbox/.dylibs/libz.1.3.1.dylib +0 -0
  18. passagemath_linbox/__init__.py +3 -0
  19. passagemath_linbox-10.6.43.dist-info/METADATA +100 -0
  20. passagemath_linbox-10.6.43.dist-info/RECORD +75 -0
  21. passagemath_linbox-10.6.43.dist-info/WHEEL +6 -0
  22. passagemath_linbox-10.6.43.dist-info/top_level.txt +3 -0
  23. sage/all__sagemath_linbox.py +2 -0
  24. sage/geometry/all__sagemath_linbox.py +1 -0
  25. sage/geometry/integral_points.pxi +1426 -0
  26. sage/geometry/integral_points_integer_dense.cpython-313-darwin.so +0 -0
  27. sage/geometry/integral_points_integer_dense.pyx +7 -0
  28. sage/libs/all__sagemath_linbox.py +1 -0
  29. sage/libs/iml.pxd +10 -0
  30. sage/libs/linbox/__init__.py +1 -0
  31. sage/libs/linbox/conversion.pxd +185 -0
  32. sage/libs/linbox/fflas.pxd +189 -0
  33. sage/libs/linbox/givaro.pxd +109 -0
  34. sage/libs/linbox/linbox.pxd +219 -0
  35. sage/libs/linbox/linbox_flint_interface.cpython-313-darwin.so +0 -0
  36. sage/libs/linbox/linbox_flint_interface.pxd +18 -0
  37. sage/libs/linbox/linbox_flint_interface.pyx +192 -0
  38. sage/libs/m4ri.pxd +198 -0
  39. sage/libs/m4rie.pxd +204 -0
  40. sage/matrix/all__sagemath_linbox.py +1 -0
  41. sage/matrix/matrix_cyclo_linbox.cpython-313-darwin.so +0 -0
  42. sage/matrix/matrix_cyclo_linbox.pyx +361 -0
  43. sage/matrix/matrix_gf2e_dense.cpython-313-darwin.so +0 -0
  44. sage/matrix/matrix_gf2e_dense.pxd +15 -0
  45. sage/matrix/matrix_gf2e_dense.pyx +1573 -0
  46. sage/matrix/matrix_integer_iml.cpython-313-darwin.so +0 -0
  47. sage/matrix/matrix_integer_iml.pyx +316 -0
  48. sage/matrix/matrix_integer_linbox.cpython-313-darwin.so +0 -0
  49. sage/matrix/matrix_integer_linbox.pxd +5 -0
  50. sage/matrix/matrix_integer_linbox.pyx +358 -0
  51. sage/matrix/matrix_integer_sparse_linbox.cpython-313-darwin.so +0 -0
  52. sage/matrix/matrix_integer_sparse_linbox.pyx +465 -0
  53. sage/matrix/matrix_mod2_dense.cpython-313-darwin.so +0 -0
  54. sage/matrix/matrix_mod2_dense.pxd +14 -0
  55. sage/matrix/matrix_mod2_dense.pyx +2789 -0
  56. sage/matrix/matrix_modn_dense_double.cpython-313-darwin.so +0 -0
  57. sage/matrix/matrix_modn_dense_double.pyx +179 -0
  58. sage/matrix/matrix_modn_dense_float.cpython-313-darwin.so +0 -0
  59. sage/matrix/matrix_modn_dense_float.pyx +154 -0
  60. sage/matrix/matrix_modn_sparse.cpython-313-darwin.so +0 -0
  61. sage/matrix/matrix_modn_sparse.pyx +871 -0
  62. sage/matrix/matrix_rational_linbox.cpython-313-darwin.so +0 -0
  63. sage/matrix/matrix_rational_linbox.pyx +36 -0
  64. sage/matrix/misc.cpython-313-darwin.so +0 -0
  65. sage/matrix/misc.pyx +418 -0
  66. sage/modules/all__sagemath_linbox.py +1 -0
  67. sage/modules/numpy_util.cpython-313-darwin.so +0 -0
  68. sage/modules/numpy_util.pxd +10 -0
  69. sage/modules/numpy_util.pyx +136 -0
  70. sage/modules/vector_mod2_dense.cpython-313-darwin.so +0 -0
  71. sage/modules/vector_mod2_dense.pxd +11 -0
  72. sage/modules/vector_mod2_dense.pyx +547 -0
  73. sage/rings/all__sagemath_linbox.py +1 -0
  74. sage/rings/finite_rings/all__sagemath_linbox.py +1 -0
  75. sage/rings/polynomial/all__sagemath_linbox.py +1 -0
@@ -0,0 +1,179 @@
1
+ # sage_setup: distribution = sagemath-linbox
2
+ # distutils: language = c++
3
+ # distutils: libraries = CBLAS_LIBRARIES
4
+ # distutils: library_dirs = CBLAS_LIBDIR
5
+ # distutils: include_dirs = CBLAS_INCDIR
6
+ # distutils: extra_compile_args = -D_XPG6
7
+ # sage.doctest: needs sage.rings.finite_rings
8
+ r"""
9
+ Dense matrices over `\ZZ/n\ZZ` for `n < 94906266` using LinBox's ``Modular<double>``
10
+
11
+ AUTHORS:
12
+
13
+ - Burcin Erocal
14
+ - Martin Albrecht
15
+ """
16
+ # #############################################################################
17
+ # Copyright (C) 2011 Burcin Erocal <burcin@erocal.org>
18
+ # Copyright (C) 2011 Martin Albrecht <martinralbrecht@googlemail.com>
19
+ #
20
+ # Distributed under the terms of the GNU General Public License (GPL)
21
+ # as published by the Free Software Foundation; either version 2 of
22
+ # the License, or (at your option) any later version.
23
+ # https://www.gnu.org/licenses/
24
+ # ****************************************************************************
25
+ from sage.rings.finite_rings.stdint cimport *
26
+
27
+ from sage.libs.linbox.givaro cimport \
28
+ Modular_double as ModField, \
29
+ Poly1Dom, Dense
30
+
31
+ from sage.libs.linbox.linbox cimport \
32
+ reducedRowEchelonize, \
33
+ DenseMatrix_Modular_double as DenseMatrix
34
+
35
+ from sage.libs.linbox.fflas cimport \
36
+ fgemm, pfgemm, fgemv, Det, pDet, Rank, pRank, ReducedRowEchelonForm, pReducedRowEchelonForm, applyP, \
37
+ MinPoly, CharPoly, MinPoly, \
38
+ ModDoubleDensePolynomial as ModDensePoly
39
+
40
+ ctypedef Poly1Dom[ModField, Dense] ModDensePolyRing
41
+
42
+ # Limit for LinBox Modular<double>
43
+ MAX_MODULUS = 94906266
44
+
45
+ from sage.rings.finite_rings.integer_mod cimport IntegerMod_int64
46
+
47
+ include "matrix_modn_dense_template.pxi"
48
+
49
+
50
+ cdef class Matrix_modn_dense_double(Matrix_modn_dense_template):
51
+ r"""
52
+ Dense matrices over `\ZZ/n\ZZ` for `n < 94906266` using LinBox's ``Modular<double>``.
53
+
54
+ These are matrices with integer entries mod ``n`` represented as
55
+ floating-point numbers in a 64-bit word for use with LinBox routines.
56
+ This allows for ``n`` up to `94906266`. By default, the analogous
57
+ ``Matrix_modn_dense_float`` class is used for smaller moduli, specifically
58
+ for ``n`` up to `2^{8}`.
59
+
60
+ Routines here are for the most basic access, see the
61
+ ``matrix_modn_dense_template.pxi`` file for higher-level routines.
62
+ """
63
+
64
+ def __cinit__(self):
65
+ """
66
+ The Cython constructor.
67
+
68
+ TESTS::
69
+
70
+ sage: A = random_matrix(IntegerModRing(2^16), 4, 4)
71
+ sage: type(A[0,0])
72
+ <class 'sage.rings.finite_rings.integer_mod.IntegerMod_int64'>
73
+ """
74
+ self._get_template = self._base_ring.zero()
75
+ # note that INTEGER_MOD_INT32_LIMIT is ceil(sqrt(2^31-1)) < 94906266
76
+ self._fits_int32 = ((<Matrix_modn_dense_template>self).p <= INTEGER_MOD_INT32_LIMIT)
77
+
78
+ cdef void set_unsafe_int(self, Py_ssize_t i, Py_ssize_t j, int value) noexcept:
79
+ r"""
80
+ Set the (i,j) entry of ``self`` to the int value.
81
+
82
+ EXAMPLES::
83
+
84
+ sage: A = random_matrix(GF(3016963), 4, 4)
85
+ sage: l = A.list()
86
+ sage: A[0,0] = 220082r
87
+ sage: A.list()[1:] == l[1:]
88
+ True
89
+ sage: a = A[0,0]; a
90
+ 220082
91
+ sage: ~a
92
+ 2859358
93
+
94
+ sage: A = random_matrix(Integers(5099106), 4, 4)
95
+ sage: l = A.list()
96
+ sage: A[0,0] = 220082r
97
+ sage: A.list()[1:] == l[1:]
98
+ True
99
+ sage: a = A[0,0]; a
100
+ 220082
101
+ sage: a*a
102
+ 4777936
103
+ """
104
+ self._matrix[i][j] = <double>value
105
+
106
+ cdef set_unsafe(self, Py_ssize_t i, Py_ssize_t j, x):
107
+ r"""
108
+ Set the (i,j) entry with no bounds-checking, or any other checks.
109
+
110
+ Assumes that `x` is in the base ring.
111
+
112
+ EXAMPLES::
113
+
114
+ sage: A = random_matrix(GF(3016963), 4, 4)
115
+ sage: K = A.base_ring()
116
+ sage: l = A.list()
117
+ sage: A[0,0] = K(220082)
118
+ sage: A.list()[1:] == l[1:]
119
+ True
120
+ sage: a = A[0,0]; a
121
+ 220082
122
+ sage: ~a
123
+ 2859358
124
+
125
+ sage: A = random_matrix(Integers(5099106), 4, 4)
126
+ sage: K = A.base_ring()
127
+ sage: l = A.list()
128
+ sage: A[0,0] = K(220081)
129
+ sage: A.list()[1:] == l[1:]
130
+ True
131
+ sage: a = A[0,0]; a
132
+ 220081
133
+ sage: a*a
134
+ 4337773
135
+ """
136
+ if (<Matrix_modn_dense_double>self)._fits_int32:
137
+ self._matrix[i][j] = <double>(<IntegerMod_int>x).ivalue
138
+ else:
139
+ self._matrix[i][j] = <double>(<IntegerMod_int64>x).ivalue
140
+
141
+ cdef IntegerMod_abstract get_unsafe(self, Py_ssize_t i, Py_ssize_t j):
142
+ r"""
143
+ Return the (i,j) entry with no bounds-checking.
144
+
145
+ OUTPUT:
146
+
147
+ A :class:`sage.rings.finite_rings.integer_mod.IntegerMod_int`
148
+ or
149
+ :class:`sage.rings.finite_rings.integer_mod.IntegerMod_int64`
150
+ object, depending on the modulus.
151
+
152
+ EXAMPLES::
153
+
154
+ sage: K = GF(3016963)
155
+ sage: l = [K.random_element() for _ in range(4*4)]
156
+ sage: A = matrix(K, 4, 4, l)
157
+ sage: a = A[0,0]
158
+ sage: a == l[0]
159
+ True
160
+ sage: a == 0 or ~a*a == 1
161
+ True
162
+ sage: a.parent() is K
163
+ True
164
+
165
+ sage: K = Integers(5099106)
166
+ sage: l = [K.random_element() for _ in range(4*4)]
167
+ sage: A = matrix(Integers(5099106), 4, 4, l)
168
+ sage: a = A[0,1]
169
+ sage: a == l[1]
170
+ True
171
+ sage: a*a == K(Integer(l[1]))^2
172
+ True
173
+ """
174
+ cdef Matrix_modn_dense_double _self = <Matrix_modn_dense_double>self
175
+ cdef double result = (<Matrix_modn_dense_template>self)._matrix[i][j]
176
+ if _self._fits_int32:
177
+ return (<IntegerMod_int>_self._get_template)._new_c(<int_fast32_t>result)
178
+ else:
179
+ return (<IntegerMod_int64>_self._get_template)._new_c(<int_fast64_t>result)
@@ -0,0 +1,154 @@
1
+ # sage_setup: distribution = sagemath-linbox
2
+ # distutils: language = c++
3
+ # distutils: libraries = CBLAS_LIBRARIES
4
+ # distutils: library_dirs = CBLAS_LIBDIR
5
+ # distutils: include_dirs = CBLAS_INCDIR
6
+ r"""
7
+ Dense matrices over `\ZZ/n\ZZ` for `n < 2^{8}` using LinBox's ``Modular<float>``
8
+
9
+ AUTHORS:
10
+ - Burcin Erocal
11
+ - Martin Albrecht
12
+ """
13
+ # #############################################################################
14
+ # Copyright (C) 2011 Burcin Erocal <burcin@erocal.org>
15
+ # Copyright (C) 2011 Martin Albrecht <martinralbrecht@googlemail.com>
16
+ #
17
+ # Distributed under the terms of the GNU General Public License (GPL)
18
+ # as published by the Free Software Foundation; either version 2 of
19
+ # the License, or (at your option) any later version.
20
+ # https://www.gnu.org/licenses/
21
+ # ****************************************************************************
22
+
23
+ from sage.rings.finite_rings.stdint cimport *
24
+
25
+ from sage.libs.linbox.givaro cimport \
26
+ Modular_float as ModField, \
27
+ Poly1Dom, Dense
28
+
29
+ from sage.libs.linbox.linbox cimport \
30
+ DenseMatrix_Modular_float as DenseMatrix, \
31
+ reducedRowEchelonize
32
+
33
+ from sage.libs.linbox.fflas cimport \
34
+ fgemm, pfgemm, fgemv, Det, pDet, Rank, pRank, ReducedRowEchelonForm, pReducedRowEchelonForm, applyP, \
35
+ MinPoly, CharPoly, \
36
+ ModFloatDensePolynomial as ModDensePoly
37
+
38
+ ctypedef Poly1Dom[ModField, Dense] ModDensePolyRing
39
+
40
+ # LinBox supports up to 2^11 using float but that's double dog slow,
41
+ # so we pick a smaller value for crossover
42
+ MAX_MODULUS = 2**8
43
+
44
+ include "matrix_modn_dense_template.pxi"
45
+
46
+ cdef class Matrix_modn_dense_float(Matrix_modn_dense_template):
47
+ r"""
48
+ Dense matrices over `\ZZ/n\ZZ` for `n < 2^{8}` using LinBox's ``Modular<float>``.
49
+
50
+ These are matrices with integer entries mod ``n`` represented as
51
+ floating-point numbers in a 32-bit word for use with LinBox routines.
52
+ This could allow for ``n`` up to `2^{11}`, but for performance reasons
53
+ this is limited to ``n`` up to `2^{8}`, and for larger moduli the
54
+ ``Matrix_modn_dense_double`` class is used.
55
+
56
+ Routines here are for the most basic access, see the
57
+ ``matrix_modn_dense_template.pxi`` file for higher-level routines.
58
+ """
59
+ def __cinit__(self):
60
+ """
61
+ The Cython constructor.
62
+
63
+ TESTS::
64
+
65
+ sage: A = random_matrix(GF(7), 4, 4)
66
+ sage: type(A[0,0])
67
+ <class 'sage.rings.finite_rings.integer_mod.IntegerMod_int'>
68
+ """
69
+ self._get_template = self._base_ring.zero()
70
+
71
+ cdef void set_unsafe_int(self, Py_ssize_t i, Py_ssize_t j, int value) noexcept:
72
+ r"""
73
+ Set the (i,j) entry of ``self`` to the int value.
74
+
75
+ EXAMPLES::
76
+
77
+ sage: A = random_matrix(GF(7), 4, 4)
78
+ sage: l = A.list()
79
+ sage: A[0,0] = 12
80
+ sage: A.list()[0] == 12
81
+ True
82
+ sage: l[1:] == A.list()[1:]
83
+ True
84
+
85
+ sage: B = random_matrix(Integers(100), 4, 4)
86
+ sage: l = B.list()
87
+ sage: B[0,0] = 422
88
+ sage: B.list()[0] == 22
89
+ True
90
+ sage: l[1:] == B.list()[1:]
91
+ True
92
+ """
93
+ self._matrix[i][j] = <float>value
94
+
95
+ cdef set_unsafe(self, Py_ssize_t i, Py_ssize_t j, x):
96
+ r"""
97
+ Set the (i,j) entry with no bounds-checking, or any other checks.
98
+
99
+ Assumes that `x` is in the base ring.
100
+
101
+ EXAMPLES::
102
+
103
+ sage: A = random_matrix(GF(13), 4, 4)
104
+ sage: l = A.list()
105
+ sage: K = A.base_ring()
106
+ sage: x = K(27)
107
+ sage: A[0,0] = x
108
+ sage: A[0,0] == x
109
+ True
110
+ sage: l[1:] == A.list()[1:]
111
+ True
112
+
113
+ sage: B = random_matrix(Integers(200), 4, 4)
114
+ sage: l = B.list()
115
+ sage: R = B.base_ring()
116
+ sage: x = R(311)
117
+ sage: B[0,0] = x
118
+ sage: B.list()[0] == x
119
+ True
120
+ sage: l[1:] == B.list()[1:]
121
+ True
122
+ """
123
+ self._matrix[i][j] = <float>(<IntegerMod_int>x).ivalue
124
+
125
+ cdef IntegerMod_int get_unsafe(self, Py_ssize_t i, Py_ssize_t j):
126
+ r"""
127
+ Return the (i,j) entry with no bounds-checking.
128
+
129
+ OUTPUT:
130
+
131
+ A :class:`sage.rings.finite_rings.integer_mod.IntegerMod_int`
132
+ object.
133
+
134
+ EXAMPLES::
135
+
136
+ sage: R = Integers(100)
137
+ sage: l = [R.random_element() for _ in range(4*4)]
138
+ sage: A = matrix(Integers(100), 4, 4, l)
139
+ sage: a = A[0,0]
140
+ sage: a == l[0]
141
+ True
142
+ sage: a in R
143
+ True
144
+
145
+ sage: l = [R.random_element() for _ in range(4*4)]
146
+ sage: B = matrix(Integers(100), 4, 4, l)
147
+ sage: b = B[0,0]
148
+ sage: b == l[0]
149
+ True
150
+ sage: b in R
151
+ True
152
+ """
153
+ cdef float result = (<Matrix_modn_dense_template>self)._matrix[i][j]
154
+ return (<Matrix_modn_dense_float>self)._get_template._new_c(<int_fast32_t>result)