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,7 @@
1
+ # sage_setup: distribution = sagemath-linbox
2
+ # cython: wraparound=False, boundscheck=False
3
+
4
+ from sage.modules.vector_integer_dense cimport Vector_integer_dense as VectorClass
5
+ from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense as MatrixClass
6
+
7
+ include "integral_points.pxi"
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-linbox
sage/libs/iml.pxd ADDED
@@ -0,0 +1,10 @@
1
+ # sage_setup: distribution = sagemath-linbox
2
+ from sage.libs.gmp.types cimport mpz_t
3
+
4
+ cdef extern from "iml.h":
5
+ cdef enum SOLU_POS:
6
+ LeftSolu
7
+ RightSolu
8
+
9
+ cdef long nullspaceMP(long n, long m, const mpz_t *A, mpz_t * *mp_N_pass)
10
+ cdef void nonsingSolvLlhsMM(SOLU_POS solupos, long n, long m, mpz_t *mp_A, mpz_t *mp_B, mpz_t *mp_N, mpz_t mp_D)
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-linbox
@@ -0,0 +1,185 @@
1
+ # sage_setup: distribution = sagemath-linbox
2
+ r"""
3
+ Inline conversions between LinBox and Sage
4
+
5
+ Each LinBox type has a corresponding Sage types and we use the following
6
+ conventions for conversion functions
7
+
8
+ - ``new_linbox_XXX`` : create a new linbox object
9
+ - ``new_sage_XXX`` : create a new Sage object
10
+ - ``set_linbox_XXX`` : set the entries of the linbox object
11
+ - ``set_sage_XXX`` : set the entries of the Sage object
12
+
13
+ For matrices that uses a flint datastructure, see the lower level conversions
14
+ in the module ``linbox_flint_interface``.
15
+ """
16
+ #*****************************************************************************
17
+ # Copyright (C) 2007 Martin Albrecht
18
+ # Copyright (C) 2008 Clement Pernet
19
+ # Copyright (C) 2018 Vincent Delecroix
20
+ #
21
+ # This program is free software: you can redistribute it and/or modify
22
+ # it under the terms of the GNU General Public License as published by
23
+ # the Free Software Foundation, either version 2 of the License, or
24
+ # (at your option) any later version.
25
+ # http://www.gnu.org/licenses/
26
+ #*****************************************************************************
27
+
28
+
29
+ from libcpp.vector cimport vector as cppvector
30
+
31
+ from sage.libs.gmp.mpz cimport mpz_set
32
+
33
+ from sage.libs.linbox.givaro cimport Modular_uint64, ZRing, Integer
34
+ from sage.libs.linbox.linbox cimport SparseMatrix_Modular_uint64, SparseMatrix_integer, DenseVector_integer
35
+
36
+ from sage.matrix.matrix_modn_sparse cimport Matrix_modn_sparse
37
+ from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse
38
+
39
+ from sage.modules.vector_modn_sparse cimport c_vector_modint
40
+ from sage.modules.vector_integer_dense cimport Vector_integer_dense
41
+ from sage.modules.vector_integer_sparse cimport mpz_vector, mpz_vector_get_entry, mpz_vector_set_entry
42
+
43
+ ########################################
44
+ # algorithm for solving linear systems #
45
+ ########################################
46
+
47
+ ctypedef enum linbox_specifier:
48
+ METHOD_DEFAULT # no specification
49
+ METHOD_DENSE_ELIMINATION # DenseElimination
50
+ METHOD_SPARSE_ELIMINATION # SparseElimination
51
+ METHOD_BLACKBOX # Blackbox
52
+ METHOD_WIEDEMANN # Wiedeman
53
+ ERROR
54
+
55
+ cdef inline linbox_specifier get_method(str algo) except ERROR:
56
+ if algo is None or algo == "default":
57
+ return METHOD_DEFAULT
58
+ elif algo == "dense_elimination" or \
59
+ algo == "linbox_dense_elimination" or \
60
+ algo == "LinBox::DenseElimination":
61
+ return METHOD_DENSE_ELIMINATION
62
+ elif algo == "sparse_elimination" or \
63
+ algo == "linbox_sparse_elimination" or \
64
+ algo == "LinBox::SparseElimination":
65
+ return METHOD_SPARSE_ELIMINATION
66
+ elif algo == "blackbox" or \
67
+ algo == "linbox_blackbox" or \
68
+ algo == "LinBox::Blackbox":
69
+ return METHOD_BLACKBOX
70
+ elif algo == 'wiedemann' or \
71
+ algo == "linbox_wiedemann" or \
72
+ algo == "LinBox::Wiedeman":
73
+ return METHOD_WIEDEMANN
74
+ else:
75
+ raise ValueError("unknown algorithm")
76
+
77
+ ################################################
78
+ # matrix_modn_sparse (sparse matrix over Z/nZ) #
79
+ ################################################
80
+
81
+ cdef inline void set_linbox_matrix_modn_sparse(SparseMatrix_Modular_uint64& A, Matrix_modn_sparse m) noexcept:
82
+ r"""
83
+ Set the entries of a LinBox matrix from a Sage matrix.
84
+
85
+ INPUT:
86
+
87
+ - ``A`` -- LinBox matrix
88
+ - ``m`` -- Sage matrix
89
+ """
90
+ cdef c_vector_modint * row
91
+ cdef size_t i, j
92
+ for i in range(<size_t> m._nrows):
93
+ row = m.rows + i
94
+ for j in range(<size_t> row.num_nonzero):
95
+ A.setEntry(i, row.positions[j], row.entries[j])
96
+
97
+ cdef inline SparseMatrix_Modular_uint64 * new_linbox_matrix_modn_sparse(Modular_uint64 &F, Matrix_modn_sparse m) noexcept:
98
+ r"""
99
+ Return a new LinBox matrix from a Sage matrix.
100
+
101
+ Such matrix has to be deallocated with a "del" statement.
102
+
103
+ INPUT:
104
+
105
+ - ``F`` -- LinBox field
106
+ - ``m`` -- Sage matrix
107
+ """
108
+ cdef SparseMatrix_Modular_uint64 * A = new SparseMatrix_Modular_uint64(F, <size_t> m._nrows, <size_t> m._ncols)
109
+ set_linbox_matrix_modn_sparse(A[0], m)
110
+ return A
111
+
112
+ #########################
113
+ # matrix_integer_sparse #
114
+ #########################
115
+
116
+ cdef inline void set_linbox_matrix_integer_sparse(SparseMatrix_integer& A, Matrix_integer_sparse m) noexcept:
117
+ r"""
118
+ Set the entries of a LinBox matrix from a Sage matrix.
119
+
120
+ INPUT:
121
+
122
+ - ``A`` -- LinBox matrix
123
+ - ``m`` -- Sage matrix
124
+ """
125
+ cdef size_t i, j, k
126
+ cdef mpz_vector * v
127
+ cdef Integer t
128
+ for i in range(<size_t> m._nrows):
129
+ v = m._matrix + i
130
+ for k in range(<size_t> v.num_nonzero):
131
+ j = v.positions[k]
132
+ mpz_set(t.get_mpz(), v.entries[k])
133
+ A.setEntry(i, j, t)
134
+
135
+ cdef inline SparseMatrix_integer * new_linbox_matrix_integer_sparse(ZRing &ZZ, Matrix_integer_sparse m) noexcept:
136
+ r"""
137
+ Return a new LinBox matrix from a Sage matrix.
138
+
139
+ Suc matrix has to be deallocated with a "del" statement.
140
+
141
+ INPUT:
142
+
143
+ - ``m`` -- Sage matrix
144
+ """
145
+ cdef SparseMatrix_integer * A = new SparseMatrix_integer(ZZ, <size_t> m._nrows, <size_t> m._ncols)
146
+ set_linbox_matrix_integer_sparse(A[0], m)
147
+ return A
148
+
149
+ ########################
150
+ # vector integer dense #
151
+ ########################
152
+
153
+ cdef inline DenseVector_integer * new_linbox_vector_integer_dense(ZRing &ZZ, Vector_integer_dense v) noexcept:
154
+ r"""
155
+ Return a new linbox vector from a sage one.
156
+
157
+ INPUT:
158
+
159
+ - ``v`` -- a Sage dense integer vector
160
+ """
161
+ cdef cppvector[Integer] * vec = new cppvector[Integer](<size_t> v._degree)
162
+ cdef size_t i
163
+ for i in range(<size_t> v._degree):
164
+ mpz_set(vec[0][i].get_mpz(), v._entries[i])
165
+
166
+ cdef DenseVector_integer * V = new DenseVector_integer(ZZ, vec[0])
167
+ del vec
168
+
169
+ return V
170
+
171
+ cdef inline Vector_integer_dense new_sage_vector_integer_dense(P, DenseVector_integer &v):
172
+ r"""
173
+ Return a new Sage vector from a LinBox one.
174
+
175
+ INPUT:
176
+
177
+ - ``P`` -- parent for the Sage vector
178
+ - ``v`` -- linbox vector
179
+ """
180
+ cdef Vector_integer_dense res = P()
181
+ cdef size_t i
182
+ for i in range(<size_t> res._degree):
183
+ mpz_set(res._entries[i], v.getEntry(i).get_mpz_const())
184
+
185
+ return res
@@ -0,0 +1,189 @@
1
+ # sage_setup: distribution = sagemath-linbox
2
+ # Issue #33153: fflas-ffpack-2.4.3 is missing a return value in one of
3
+ # its functions and runs afoul of -Werror=return-type. Compounding the
4
+ # problem on openSUSE tumbleweed, the CFLAGS in python's sysconfig
5
+ # contain -Werror=return-type and wind up being used to compile this
6
+ # extension. To avoid a compilation failure on that platform, we
7
+ # temporarily append "-Wno-error=return-type" to those flags.
8
+ #
9
+ # distutils: extra_compile_args = FFLASFFPACK_CFLAGS -Wno-error=return-type
10
+ #
11
+ # distutils: include_dirs = FFLASFFPACK_INCDIR
12
+ # distutils: libraries = FFLASFFPACK_LIBRARIES
13
+ # distutils: library_dirs = FFLASFFPACK_LIBDIR
14
+ # distutils: extra_link_args = FFLASFFPACK_LIBEXTRA
15
+ # distutils: language = c++
16
+
17
+ from sage.libs.linbox.givaro cimport Modular_double, Modular_float, Dense, Sparse
18
+ from sage.libs.linbox.givaro cimport givvector, Poly1Dom
19
+ from libcpp.vector cimport vector
20
+ from libcpp cimport bool
21
+ ctypedef Poly1Dom[Modular_double, Dense] PolynomialRing_Modular_double
22
+ ctypedef Poly1Dom[Modular_float, Dense] PolynomialRing_Modular_float
23
+
24
+ ctypedef givvector[Modular_double.Element] ModDoubleDensePolynomial
25
+ ctypedef givvector[Modular_float.Element] ModFloatDensePolynomial
26
+
27
+ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFLAS":
28
+ ctypedef enum FFLAS_TRANSPOSE:
29
+ FflasNoTrans
30
+ FflasTrans
31
+
32
+ ctypedef enum FFLAS_SIDE:
33
+ FflasRight
34
+
35
+ # double
36
+ Modular_double.Element* fgemv (Modular_double F, FFLAS_TRANSPOSE transA,
37
+ size_t nrows, size_t ncols,
38
+ Modular_double.Element alpha, Modular_double.Element* A,
39
+ size_t lda, Modular_double.Element* X, size_t incX,
40
+ Modular_double.Element beta, Modular_double.Element* Y,
41
+ size_t incY)
42
+
43
+ Modular_double.Element* fgemm (Modular_double F,
44
+ FFLAS_TRANSPOSE transA, FFLAS_TRANSPOSE transB,
45
+ size_t nrowsA, size_t ncolsB, size_t ncolsA,
46
+ Modular_double.Element alpha, Modular_double.Element* A,
47
+ size_t A_stride, Modular_double.Element* B, int B_stride,
48
+ Modular_double.Element beta, Modular_double.Element* C,
49
+ size_t C_stride)
50
+
51
+ Modular_double.Element* pfgemm (Modular_double F,
52
+ FFLAS_TRANSPOSE transA, FFLAS_TRANSPOSE transB,
53
+ size_t nrowsA, size_t ncolsB, size_t ncolsA,
54
+ Modular_double.Element alpha, Modular_double.Element* A,
55
+ size_t A_stride, Modular_double.Element* B, int B_stride,
56
+ Modular_double.Element beta, Modular_double.Element* C,
57
+ size_t C_stride, size_t numthreads)
58
+
59
+ # float
60
+ Modular_float.Element* fgemv (Modular_float F, FFLAS_TRANSPOSE transA,
61
+ size_t nrows, size_t ncols,
62
+ Modular_float.Element alpha, Modular_float.Element* A,
63
+ size_t lda, Modular_float.Element* X, size_t incX,
64
+ Modular_float.Element beta, Modular_float.Element* Y,
65
+ size_t incY)
66
+
67
+ Modular_float.Element* fgemm (Modular_float F,
68
+ FFLAS_TRANSPOSE transA, FFLAS_TRANSPOSE transB,
69
+ size_t nrowsA, size_t ncolsB, size_t ncolsA,
70
+ Modular_float.Element alpha, Modular_float.Element* A,
71
+ size_t A_stride, Modular_float.Element* B, int B_stride,
72
+ Modular_float.Element beta, Modular_float.Element* C,
73
+ size_t C_stride)
74
+
75
+ Modular_float.Element* pfgemm (Modular_float F,
76
+ FFLAS_TRANSPOSE transA, FFLAS_TRANSPOSE transB,
77
+ size_t nrowsA, size_t ncolsB, size_t ncolsA,
78
+ Modular_float.Element alpha, Modular_float.Element* A,
79
+ size_t A_stride, Modular_float.Element* B, int B_stride,
80
+ Modular_float.Element beta, Modular_float.Element* C,
81
+ size_t C_stride, size_t numthreads)
82
+
83
+ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "FFPACK":
84
+ # double
85
+ bint IsSingular (Modular_double F,
86
+ size_t nrows, size_t ncols, Modular_double.Element* A,
87
+ size_t A_stride)
88
+
89
+ Modular_double.Element* Invert (Modular_double F, size_t order,
90
+ Modular_double.Element* A, size_t A_stride, int nullity)
91
+
92
+ Modular_double.Element Det (Modular_double F, Modular_double.Element& d, size_t n,
93
+ Modular_double.Element* A, size_t A_stride)
94
+
95
+ Modular_double.Element pDet (Modular_double F, Modular_double.Element& d, size_t n,
96
+ Modular_double.Element* A, size_t A_stride, size_t numthreads)
97
+
98
+ int Rank (Modular_double,
99
+ size_t nrows, size_t ncols,
100
+ Modular_double.Element *A, size_t lda)
101
+
102
+ int pRank (Modular_double,
103
+ size_t nrows, size_t ncols,
104
+ Modular_double.Element *A, size_t lda, size_t numthreads)
105
+
106
+ size_t ReducedRowEchelonForm (Modular_double F, size_t a, size_t b,
107
+ Modular_double.Element* matrix,
108
+ size_t s, size_t* P, size_t* Q)
109
+
110
+ size_t pReducedRowEchelonForm (Modular_double F, size_t a, size_t b,
111
+ Modular_double.Element* matrix,
112
+ size_t s, size_t* P, size_t* Q, bool transform, size_t numthreads)
113
+
114
+ Modular_double.Element* Solve (Modular_double F, size_t M,
115
+ Modular_double.Element* A, size_t lda,
116
+ Modular_double.Element* x, int incx,
117
+ Modular_double.Element* b, int incb)
118
+
119
+ Modular_double.Element* pSolve (Modular_double F, size_t M,
120
+ Modular_double.Element* A, size_t lda,
121
+ Modular_double.Element* x, int incx,
122
+ Modular_double.Element* b, int incb, size_t numthreads)
123
+
124
+ void applyP (Modular_double F,
125
+ FFLAS_SIDE s, FFLAS_TRANSPOSE tr,
126
+ size_t nr, size_t foo, size_t r,
127
+ Modular_double.Element* matrix, size_t nc, size_t* Q)
128
+
129
+ void MinPoly ( Modular_double& F,
130
+ vector[Modular_double.Element] minP, size_t N,
131
+ Modular_double.Element*A, size_t lda)
132
+
133
+ void CharPoly ( PolynomialRing_Modular_double& R,
134
+ ModDoubleDensePolynomial& charp, size_t N,
135
+ Modular_double.Element* A, size_t lda)
136
+
137
+ # float
138
+
139
+ bint IsSingular (Modular_float F,
140
+ size_t nrows, size_t ncols, Modular_float.Element* A,
141
+ size_t A_stride)
142
+
143
+ Modular_float.Element* Invert (Modular_float F, size_t order,
144
+ Modular_float.Element* A, size_t A_stride, int nullity)
145
+
146
+ Modular_float.Element Det (Modular_float F, Modular_float.Element& d, size_t n,
147
+ Modular_float.Element* A, size_t A_stride)
148
+
149
+ Modular_float.Element pDet (Modular_float F, Modular_float.Element& d, size_t n,
150
+ Modular_float.Element* A, size_t A_stride, size_t numthreads)
151
+
152
+ int Rank (Modular_float,
153
+ size_t nrows, size_t ncols,
154
+ Modular_float.Element *A, size_t lda)
155
+
156
+ int pRank (Modular_float,
157
+ size_t nrows, size_t ncols,
158
+ Modular_float.Element *A, size_t lda, size_t numthreads)
159
+
160
+ size_t ReducedRowEchelonForm (Modular_float F, size_t a, size_t b,
161
+ Modular_float.Element* matrix,
162
+ size_t s, size_t* P, size_t* Q)
163
+
164
+ size_t pReducedRowEchelonForm (Modular_float F, size_t a, size_t b,
165
+ Modular_float.Element* matrix,
166
+ size_t s, size_t* P, size_t* Q, bool transform, size_t numthreads)
167
+
168
+ Modular_float.Element* Solve (Modular_float F, size_t M,
169
+ Modular_float.Element* A, size_t lda,
170
+ Modular_float.Element* x, int incx,
171
+ Modular_float.Element* b, int incb)
172
+
173
+ Modular_float.Element* pSolve (Modular_float F, size_t M,
174
+ Modular_float.Element* A, size_t lda,
175
+ Modular_float.Element* x, int incx,
176
+ Modular_float.Element* b, int incb, size_t numthreads)
177
+
178
+ void applyP (Modular_float F,
179
+ FFLAS_SIDE s, FFLAS_TRANSPOSE tr,
180
+ size_t nr, size_t foo, size_t r,
181
+ Modular_float.Element* matrix, size_t nc, size_t* Q)
182
+
183
+ void MinPoly ( Modular_float F,
184
+ vector[Modular_float.Element] minP, size_t N,
185
+ Modular_float.Element* A, size_t lda)
186
+
187
+ void CharPoly ( PolynomialRing_Modular_float& F,
188
+ ModFloatDensePolynomial& charp, size_t N,
189
+ Modular_float.Element* A, size_t lda )
@@ -0,0 +1,109 @@
1
+ # sage_setup: distribution = sagemath-linbox
2
+ # distutils: extra_compile_args = GIVARO_CFLAGS
3
+ # distutils: include_dirs = GIVARO_INCDIR
4
+ # distutils: libraries = GIVARO_LIBRARIES FFLASFFPACK_LIBRARIES
5
+ # distutils: library_dirs = GIVARO_LIBDIR
6
+ # distutils: language = c++
7
+
8
+ from libc.stdint cimport uint32_t, uint64_t
9
+
10
+ from sage.libs.gmp.types cimport (mpz_t, mpz_srcptr, mpz_ptr,
11
+ mpq_t, mpq_srcptr, mpq_ptr)
12
+
13
+ cdef extern from "<iostream>" namespace "std":
14
+ cdef cppclass ostream:
15
+ ostream& write(const char*, int) except +
16
+
17
+ cdef extern from "gmp++/gmp++.h" namespace "Givaro":
18
+ cdef cppclass Integer:
19
+ Integer()
20
+ Integer(int32_t)
21
+ Integer(int64_t)
22
+ Integer(uint32_t)
23
+ Integer(uint64_t)
24
+ Integer(Integer&)
25
+
26
+ mpz_ptr get_mpz()
27
+ mpz_srcptr get_mpz_const()
28
+
29
+ cdef extern from "givaro/givcategory.h" namespace "Givaro":
30
+ cdef cppclass Sporadic:
31
+ pass
32
+ cdef cppclass Dense:
33
+ pass
34
+ cdef cppclass Sparse:
35
+ pass
36
+
37
+ cdef extern from "givaro/zring.h":
38
+ ## template<class _Element> class ZRing
39
+ cdef cppclass ZRing "Givaro::ZRing<Givaro::Integer>":
40
+ ctypedef Integer Element
41
+ Element zero
42
+ Element one
43
+ Element mone
44
+
45
+ cdef extern from "givaro/modular-integral.h":
46
+ cdef cppclass Modular_uint64 "Givaro::Modular<uint64_t>":
47
+ ctypedef uint64_t Element
48
+ Modular_uint64(int modulus)
49
+
50
+ Element init(Element res, int v)
51
+ Element inv(Element x, Element y)
52
+ Element neg(Element x, Element y)
53
+ Element mul(Element r, Element x, Element y)
54
+ Element mulin(Element x, Element y)
55
+ Element addin(Element x, Element y)
56
+ Element invin(Element y)
57
+ Element negin(Element y)
58
+ int characteristic(int c)
59
+ bint isZero(Element x)
60
+
61
+ ostream& write(ostream&)
62
+
63
+ cdef extern from "givaro/modular-floating.h":
64
+ cdef cppclass Modular_double "Givaro::Modular<double>":
65
+ ctypedef double Element
66
+ Modular_double(int modulus)
67
+
68
+ Element init(Element res, int v)
69
+ Element init(Element res, double v)
70
+ Element inv(Element x, Element y)
71
+ Element neg(Element x, Element y)
72
+ Element mul(Element r, Element x, Element y)
73
+ Element mulin(Element x, Element y)
74
+ Element addin(Element x, Element y)
75
+ Element invin(Element y)
76
+ Element negin(Element y)
77
+ int characteristic(int c)
78
+ bint isZero(Element x)
79
+
80
+ ostream& write(ostream&)
81
+
82
+ cdef cppclass Modular_float "Givaro::Modular<float>":
83
+ ctypedef float Element
84
+ Modular_float(int modulus)
85
+
86
+ Element init(Element res, int v)
87
+ Element init(Element res, float v)
88
+ Element inv(Element x, Element y)
89
+ Element neg(Element x, Element y)
90
+ Element mul(Element r, Element x, Element y)
91
+ Element mulin(Element x, Element y)
92
+ Element addin(Element x, Element y)
93
+ Element invin(Element y)
94
+ Element negin(Element y)
95
+ int characteristic(int c)
96
+ bint isZero(Element x)
97
+
98
+ ostream& write(ostream&)
99
+
100
+ cdef extern from "givaro/givpoly1.h" namespace "Givaro":
101
+ ## template < typename T, typename A=std::allocator<T> >
102
+ ## class givvector : public __GIV_STANDARD_VECTOR<T,A>
103
+ cdef cppclass givvector [T,ALLOCATOR=*]:
104
+ T& operator[](size_t i)
105
+ size_t size()
106
+
107
+ ## template<class Domain, class StorageTag=Dense> class Poly1Dom
108
+ cdef cppclass Poly1Dom[Domain,StorageClass=*]:
109
+ Poly1Dom(Domain&)