passagemath-m4ri-m4rie 10.8.1rc0__cp312-cp312-win_amd64.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-m4ri-m4rie might be problematic. Click here for more details.

Files changed (31) hide show
  1. passagemath_m4ri_m4rie/__init__.py +3 -0
  2. passagemath_m4ri_m4rie-10.8.1rc0.dist-info/DELVEWHEEL +2 -0
  3. passagemath_m4ri_m4rie-10.8.1rc0.dist-info/METADATA +107 -0
  4. passagemath_m4ri_m4rie-10.8.1rc0.dist-info/RECORD +31 -0
  5. passagemath_m4ri_m4rie-10.8.1rc0.dist-info/WHEEL +5 -0
  6. passagemath_m4ri_m4rie-10.8.1rc0.dist-info/top_level.txt +3 -0
  7. passagemath_m4ri_m4rie.libs/libgd-3-c61e7774529134604ac795e62efaf403.dll +0 -0
  8. passagemath_m4ri_m4rie.libs/libgmp-10-794009e46893ff9a2414ad67e43fe75c.dll +0 -0
  9. passagemath_m4ri_m4rie.libs/libiconv-2-ff31fa811f9c07cc7fdaa68c9e8bca3a.dll +0 -0
  10. passagemath_m4ri_m4rie.libs/libm4ri-2-9729666b38684339900e7e99b07c3429.dll +0 -0
  11. passagemath_m4ri_m4rie.libs/libm4rie-1-0fdffa6c128e9dab0da9764b26814f9c.dll +0 -0
  12. passagemath_m4ri_m4rie.libs/libpng16-16-435fb9547382c2a0ae933c65b9ae2dff.dll +0 -0
  13. passagemath_m4ri_m4rie.libs/zlib1-fc169cee00e737ab1f0556b1f633363b.dll +0 -0
  14. sage/all__sagemath_m4ri_m4rie.py +11 -0
  15. sage/libs/all__sagemath_m4ri_m4rie.py +1 -0
  16. sage/libs/m4ri.pxd +198 -0
  17. sage/libs/m4rie.pxd +206 -0
  18. sage/matrix/all__sagemath_m4ri_m4rie.py +1 -0
  19. sage/matrix/matrix_gf2e_dense.cp312-win_amd64.pyd +0 -0
  20. sage/matrix/matrix_gf2e_dense.pxd +14 -0
  21. sage/matrix/matrix_gf2e_dense.pyx +1749 -0
  22. sage/matrix/matrix_mod2_dense.cp312-win_amd64.pyd +0 -0
  23. sage/matrix/matrix_mod2_dense.pxd +14 -0
  24. sage/matrix/matrix_mod2_dense.pyx +2843 -0
  25. sage/modules/all__sagemath_m4ri_m4rie.py +1 -0
  26. sage/modules/numpy_util.cp312-win_amd64.pyd +0 -0
  27. sage/modules/numpy_util.pxd +10 -0
  28. sage/modules/numpy_util.pyx +136 -0
  29. sage/modules/vector_mod2_dense.cp312-win_amd64.pyd +0 -0
  30. sage/modules/vector_mod2_dense.pxd +11 -0
  31. sage/modules/vector_mod2_dense.pyx +547 -0
@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-m4ri-m4rie
2
+
3
+ from sage.all__sagemath_m4ri_m4rie import *
@@ -0,0 +1,2 @@
1
+ Version: 1.12.0
2
+ Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ki67ldfq\\cp312-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-vv', '--custom-patch', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ki67ldfq\\cp312-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ki67ldfq\\cp312-win_amd64\\built_wheel\\passagemath_m4ri_m4rie-10.8.1rc0-cp312-cp312-win_amd64.whl']
@@ -0,0 +1,107 @@
1
+ Metadata-Version: 2.4
2
+ Name: passagemath-m4ri-m4rie
3
+ Version: 10.8.1rc0
4
+ Summary: passagemath: Linear Algebra with m4ri and m4rie
5
+ Author-email: The Sage Developers <sage-support@googlegroups.com>
6
+ Maintainer: Matthias Köppe, passagemath contributors
7
+ License-Expression: GPL-2.0-or-later
8
+ Project-URL: release notes, https://github.com/passagemath/passagemath/releases
9
+ Project-URL: repo (upstream), https://github.com/sagemath/sage
10
+ Project-URL: repo, https://github.com/passagemath/passagemath
11
+ Project-URL: documentation, https://passagemath.org/docs/latest
12
+ Project-URL: homepage (upstream), https://www.sagemath.org
13
+ Project-URL: discourse, https://passagemath.discourse.group
14
+ Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
15
+ Project-URL: tracker, https://github.com/passagemath/passagemath/issues
16
+ Classifier: Development Status :: 6 - Mature
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Operating System :: MacOS :: MacOS X
22
+ Classifier: Operating System :: Microsoft :: Windows
23
+ Classifier: Programming Language :: Python :: 3 :: Only
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: 3.14
28
+ Classifier: Programming Language :: Python :: Implementation :: CPython
29
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
30
+ Requires-Python: <3.15,>=3.11
31
+ Description-Content-Type: text/x-rst
32
+ Requires-Dist: cysignals!=1.12.4; sys_platform == "win32"
33
+ Requires-Dist: cysignals!=1.12.0,>=1.11.2
34
+ Requires-Dist: memory_allocator<0.2
35
+ Requires-Dist: passagemath-environment==10.8.1rc0
36
+ Requires-Dist: passagemath-categories==10.8.1rc0
37
+ Requires-Dist: passagemath-modules==10.8.1rc0
38
+ Provides-Extra: test
39
+ Requires-Dist: passagemath-repl; extra == "test"
40
+ Requires-Dist: passagemath-pari; extra == "test"
41
+
42
+ =================================================
43
+ passagemath: Linear Algebra with m4ri and m4rie
44
+ =================================================
45
+
46
+ `passagemath <https://github.com/passagemath/passagemath>`__ is open
47
+ source mathematical software in Python, released under the GNU General
48
+ Public Licence GPLv2+.
49
+
50
+ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
51
+ developed 2005-2025 under the motto “Creating a Viable Open Source
52
+ Alternative to Magma, Maple, Mathematica, and MATLAB”.
53
+
54
+ The passagemath fork uses the motto "Creating a Free Passage Between the
55
+ Scientific Python Ecosystem and Mathematical Software Communities."
56
+ It was created in October 2024 with the following goals:
57
+
58
+ - providing modularized installation with pip,
59
+ - establishing first-class membership in the scientific Python
60
+ ecosystem,
61
+ - giving `clear attribution of upstream
62
+ projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
63
+ - providing independently usable Python interfaces to upstream
64
+ libraries,
65
+ - offering `platform portability and integration testing
66
+ services <https://github.com/passagemath/passagemath/issues/704>`__
67
+ to upstream projects,
68
+ - inviting collaborations with upstream projects,
69
+ - `building a professional, respectful, inclusive
70
+ community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
71
+ - `empowering Sage users to participate in the scientific Python ecosystem
72
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
73
+ - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
74
+ serverless deployment with Javascript,
75
+ - developing a native Windows port.
76
+
77
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
78
+ available online.
79
+
80
+ passagemath attempts to support and provides binary wheels suitable for
81
+ all major Linux distributions and recent versions of macOS.
82
+
83
+ Binary wheels for native Windows (x86_64) are are available for a subset of
84
+ the passagemath distributions. Use of the full functionality of passagemath
85
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
86
+ or virtualization.
87
+
88
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.14.x.
89
+
90
+
91
+ About this pip-installable distribution package
92
+ -----------------------------------------------
93
+
94
+ This pip-installable distribution ``passagemath-m4ri-m4rie``
95
+ provides modules that depend on the libraries
96
+ `m4ri <https://bitbucket.org/malb/m4ri/src/master/>`_,
97
+ `m4rie <https://bitbucket.org/malb/m4rie/src/master/>`_.
98
+
99
+
100
+ What is included
101
+ ----------------
102
+
103
+ - `Dense matrices over GF(2) using the M4RI library <https://passagemath.org/docs/latest/html/en/reference/matrices/sage/matrix/matrix_mod2_dense.html>`__
104
+
105
+ - `Dense matrices over GF(2**e) for e from 2 to 16 using the M4RIE library <https://passagemath.org/docs/latest/html/en/reference/matrices/sage/matrix/matrix_gf2e_dense.html>`__
106
+
107
+ - `Vectors with elements in GF(2) <https://passagemath.org/docs/latest/html/en/reference/modules/sage/modules/vector_mod2_dense.html>`__
@@ -0,0 +1,31 @@
1
+ passagemath_m4ri_m4rie/__init__.py,sha256=iRfLnZs3v4u5SwObgolyWr6miv2UqImJqhQOhkkrHDA,94
2
+ passagemath_m4ri_m4rie-10.8.1rc0.dist-info/DELVEWHEEL,sha256=OyLZs-GfH4471B6R_oOGGktshFnXI6DSfFZsMiaLtSw,444
3
+ passagemath_m4ri_m4rie-10.8.1rc0.dist-info/METADATA,sha256=jwhBZPsybUatdR3NtD2i_vcpY5yiDrXR6coeD-yZRHg,5186
4
+ passagemath_m4ri_m4rie-10.8.1rc0.dist-info/RECORD,,
5
+ passagemath_m4ri_m4rie-10.8.1rc0.dist-info/top_level.txt,sha256=VYtehKnlOP033PAdgMHCtjdtvRhdEkQ1-gXJRPdVaOM,29
6
+ passagemath_m4ri_m4rie-10.8.1rc0.dist-info/WHEEL,sha256=4SIlGrTWEevUMa-6zmQ9aBHcYatnnG9aOHYILIJiCXU,102
7
+ passagemath_m4ri_m4rie.libs/libgd-3-c61e7774529134604ac795e62efaf403.dll,sha256=YwbA1innVct8Ixz51WZ4phPdTitjxXGtQSZrP8POhzA,1029367
8
+ passagemath_m4ri_m4rie.libs/libgmp-10-794009e46893ff9a2414ad67e43fe75c.dll,sha256=eUAJ5GiT_5okFK1n5D_nXGqBOQjLrnzSAz4fr2uGCVk,3004991
9
+ passagemath_m4ri_m4rie.libs/libiconv-2-ff31fa811f9c07cc7fdaa68c9e8bca3a.dll,sha256=_zH6gR-cB8x_2qaMnovKOntP324KB5pYF16li6E5x64,1136529
10
+ passagemath_m4ri_m4rie.libs/libm4ri-2-9729666b38684339900e7e99b07c3429.dll,sha256=icnY62fxgNsZE4pnY7Sf32JRliHXBMOuJnEP7Qu6uy8,881994
11
+ passagemath_m4ri_m4rie.libs/libm4rie-1-0fdffa6c128e9dab0da9764b26814f9c.dll,sha256=vOxsLHa0eRoCor7Bfbm-ejLLAZvIPVfAnCYjvEkh95w,2295991
12
+ passagemath_m4ri_m4rie.libs/libpng16-16-435fb9547382c2a0ae933c65b9ae2dff.dll,sha256=5jLcBMxD92fXX7OuIr4Uz3C3JO2vW1gv09mTEzNsae0,1159070
13
+ passagemath_m4ri_m4rie.libs/zlib1-fc169cee00e737ab1f0556b1f633363b.dll,sha256=_Bac7gDnN6sfBVax9jM2O8UmNLdj7hgnc_UyaQZt_7M,396070
14
+ sage/all__sagemath_m4ri_m4rie.py,sha256=aRCLJjC8-R-Y7tdCGntbjUmD65xKi3ecqS1OCRiBw-8,374
15
+ sage/libs/all__sagemath_m4ri_m4rie.py,sha256=L-17t91PRczBYPsQIj9LZALGVC4J78DQme9qg1zio_E,49
16
+ sage/libs/m4ri.pxd,sha256=JVvhBpqVlRSCT5wAOiS7b2hVj9GCoPq5cj46hjfxaHU,5444
17
+ sage/libs/m4rie.pxd,sha256=DsJxIv5ENOYSZvld2PGnj2hgBrgPMCkh3_R0Ebdn6kw,6632
18
+ sage/matrix/all__sagemath_m4ri_m4rie.py,sha256=L-17t91PRczBYPsQIj9LZALGVC4J78DQme9qg1zio_E,49
19
+ sage/matrix/matrix_gf2e_dense.cp312-win_amd64.pyd,sha256=LkpssqEKmaESfqsap6d71Rontutk3bTtDTyDqMGSOds,195072
20
+ sage/matrix/matrix_gf2e_dense.pxd,sha256=Hfve_Glya4MAMcK78FSs8aMsPHLNuY1Qk7tdEFQuQZ8,592
21
+ sage/matrix/matrix_gf2e_dense.pyx,sha256=aR17tglB0wNr8vrChFIg8cMtSa29YtaAF2SLLOCI4Jg,57966
22
+ sage/matrix/matrix_mod2_dense.cp312-win_amd64.pyd,sha256=adE1fx40Axp9cW7cQVYiFwtUNC5vsGjVYJNtMCq4OLc,283136
23
+ sage/matrix/matrix_mod2_dense.pxd,sha256=VsOtqaInYPWTGG8DgOc5I5FfSSmD2mnwuH-my4qI8Ms,524
24
+ sage/matrix/matrix_mod2_dense.pyx,sha256=rJ3f4xqhBGjdR00ijX2QB3jyEu2JBAJFwjxq7_WjE0E,94053
25
+ sage/modules/all__sagemath_m4ri_m4rie.py,sha256=L-17t91PRczBYPsQIj9LZALGVC4J78DQme9qg1zio_E,49
26
+ sage/modules/numpy_util.cp312-win_amd64.pyd,sha256=YCV6QrukZPLk2CaitQpp8yOv00-RVuEHOMF45gU1F_A,179200
27
+ sage/modules/numpy_util.pxd,sha256=YdZcgoaja4Ht4_Taz0vBQt4Bg3zlekCmIHTsAj9V4rI,493
28
+ sage/modules/numpy_util.pyx,sha256=rVEfRaSoseNmJrmHqeVojJ8MNy4eLXJOFFSsyDW-BAg,4699
29
+ sage/modules/vector_mod2_dense.cp312-win_amd64.pyd,sha256=H_gUDi77QbnBKYYbBjiE5PvYCkhdXjl1PuWTCa6vO00,107008
30
+ sage/modules/vector_mod2_dense.pxd,sha256=yo5evcgW0iC-tMJsl2-9Rz32XDVMgYB0sVbkTRFYywQ,321
31
+ sage/modules/vector_mod2_dense.pyx,sha256=hQJ8zWolq0AzPDBXaQet6lJPxTfbW4WNB043lBqWAZg,16481
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-win_amd64
5
+
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_m4ri_m4rie
3
+ sage
@@ -0,0 +1,11 @@
1
+ # sage_setup: distribution = sagemath-m4ri-m4rie
2
+ # start delvewheel patch
3
+ def _delvewheel_patch_1_12_0():
4
+ import os
5
+ if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'passagemath_m4ri_m4rie.libs'))):
6
+ os.add_dll_directory(libs_dir)
7
+
8
+
9
+ _delvewheel_patch_1_12_0()
10
+ del _delvewheel_patch_1_12_0
11
+ # end delvewheel patch
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-m4ri-m4rie
sage/libs/m4ri.pxd ADDED
@@ -0,0 +1,198 @@
1
+ # sage_setup: distribution = sagemath-m4ri-m4rie
2
+ # distutils: extra_compile_args = -std=c++14
3
+ # distutils: language = c++
4
+
5
+ cdef extern from "m4ri/m4ri.h":
6
+ ctypedef int rci_t
7
+ ctypedef int wi_t
8
+ ctypedef unsigned long long m4ri_word "word"
9
+ ctypedef int BIT
10
+
11
+ ctypedef struct mzd_t:
12
+ rci_t nrows
13
+ rci_t ncols
14
+ wi_t width
15
+
16
+ ctypedef struct mzp_t:
17
+ rci_t *values
18
+ rci_t size
19
+
20
+ cdef int m4ri_radix
21
+
22
+ ##############
23
+ # Maintenance
24
+ ##############
25
+
26
+ # builds all gray codes up to a certain size
27
+ cdef void m4ri_build_all_codes()
28
+ cdef void m4ri_destroy_all_codes()
29
+
30
+ ##############
31
+ # Constructors
32
+ ##############
33
+
34
+ # create empty matrix
35
+ cdef mzd_t *mzd_init(rci_t , rci_t)
36
+
37
+ # create the identity permutation
38
+ cdef mzp_t *mzp_init(rci_t)
39
+
40
+ # free memory for the matrix
41
+ cdef void mzd_free(mzd_t *)
42
+
43
+ # free memory for the permutation
44
+ cdef void mzp_free(mzp_t *)
45
+
46
+ # filled uniformly random
47
+ cdef void mzd_randomize(mzd_t *)
48
+
49
+ # identity matrix if i%2
50
+ cdef void mzd_set_ui(mzd_t *, unsigned int )
51
+
52
+ # [A],[B] -> [AB]
53
+ cdef mzd_t *mzd_concat(mzd_t *, mzd_t *, mzd_t *)
54
+
55
+ # [A],[B] -> | A |
56
+ # | B |
57
+ cdef mzd_t *mzd_stack(mzd_t *, mzd_t *, mzd_t *)
58
+
59
+ # returns a submatrix from a
60
+ cdef mzd_t *mzd_submatrix(mzd_t *, mzd_t *, rci_t lowr, rci_t lowc, rci_t highr, rci_t highc)
61
+
62
+ # return a matrix window to A
63
+ cdef mzd_t *mzd_init_window(mzd_t *, rci_t lowr, rci_t lowc, rci_t highr, rci_t highc)
64
+
65
+ cdef void mzd_free_window(mzd_t *)
66
+
67
+ # deep copy
68
+ cdef mzd_t *mzd_copy(mzd_t *, mzd_t *)
69
+
70
+ # printing
71
+ cdef void mzd_print(mzd_t *)
72
+
73
+ ##############
74
+ # Bit Level IO
75
+ ##############
76
+
77
+ # set BIT
78
+ cdef void mzd_write_bit( mzd_t *m, rci_t row, rci_t col, BIT value)
79
+
80
+ # get BIT
81
+ cdef BIT mzd_read_bit( mzd_t *m, rci_t row, rci_t col )
82
+
83
+ # get BITs (n<=64)
84
+ cdef m4ri_word mzd_read_bits( mzd_t *m, rci_t row, rci_t col, int n)
85
+
86
+ #####################
87
+ # Row/Column Based IO
88
+ #####################
89
+
90
+ cdef m4ri_word *mzd_row(mzd_t *, rci_t)
91
+
92
+ cdef void mzd_row_swap(mzd_t *, rci_t, rci_t)
93
+
94
+ cdef void mzd_col_swap(mzd_t *, rci_t, rci_t)
95
+
96
+ cdef void mzd_row_clear_offset(mzd_t *m, rci_t, rci_t)
97
+
98
+ cdef void mzd_row_add_offset(mzd_t *m, rci_t, rci_t, rci_t)
99
+
100
+ ############
101
+ # Arithmetic
102
+ ############
103
+
104
+ # matrix addition
105
+ cdef mzd_t *mzd_add(mzd_t *, mzd_t *, mzd_t *)
106
+
107
+ # naive cubic matrix multiply
108
+ cdef mzd_t *mzd_mul_naive(mzd_t *, mzd_t *, mzd_t *)
109
+
110
+ # naive cubic matrix multiply (b is pre-transposed)
111
+ cdef mzd_t *_mzd_mul_naive(mzd_t *, mzd_t *, mzd_t *, int)
112
+
113
+ # matrix multiply using Gray codes
114
+ cdef mzd_t *mzd_mul_m4rm(mzd_t *, mzd_t *, mzd_t *, int k)
115
+
116
+ # matrix multiply using Gray codes (transposed)
117
+ cdef mzd_t *mzd_mul_m4rm_t(mzd_t *, mzd_t *, mzd_t *, int k)
118
+
119
+ # matrix multiply and addition using Gray codes: C = C + AB
120
+ cdef mzd_t *mzd_addmul_m4rm(mzd_t *, mzd_t *, mzd_t *, int k)
121
+
122
+ # matrix multiplication via Strassen's formula
123
+ cdef mzd_t *mzd_mul(mzd_t *, mzd_t *, mzd_t *, int cutoff)
124
+
125
+ # C = C + AB via Strassen's formula
126
+ cdef mzd_t *mzd_addmul(mzd_t *, mzd_t *, mzd_t *, int cutoff)
127
+
128
+ # equality testing
129
+ cdef int mzd_equal(mzd_t *, mzd_t *)
130
+
131
+ # returns -1,0,1
132
+ cdef int mzd_cmp(mzd_t *, mzd_t *)
133
+
134
+ # transpose
135
+ cdef mzd_t *mzd_transpose(mzd_t *, mzd_t *)
136
+
137
+ # density with given resolution
138
+ cdef double mzd_density(mzd_t *, int resolution)
139
+
140
+ ########################
141
+ # LAPACK Level Functions
142
+ ########################
143
+
144
+ # cubic Gaussian elimination
145
+ cdef int mzd_echelonize_naive(mzd_t *, int full)
146
+
147
+ # row echelon form using Gray codes
148
+ cdef int mzd_echelonize_m4ri(mzd_t *m, int full, int k)
149
+
150
+ # reduced row echelon form from upper triangular form
151
+ cdef void mzd_top_echelonize_m4ri(mzd_t *m, int k)
152
+
153
+ # heuristic choice of algorithms
154
+ cdef int mzd_echelonize(mzd_t *m, int full)
155
+
156
+ # matrix inversion using Gray codes
157
+ cdef mzd_t *mzd_inv_m4ri(mzd_t *dst, mzd_t *src, int k)
158
+
159
+ # asymptotically fast PLUQ factorization
160
+ cdef long mzd_pluq(mzd_t *A, mzp_t *P, mzp_t *Q, int cutoff)
161
+
162
+ # PLUQ factorization using Gray codes
163
+ cdef long _mzd_pluq_russian(mzd_t *A, mzp_t *P, mzp_t *Q, int k)
164
+
165
+ # cubic PLUQ factorization
166
+ cdef long _mzd_pluq_naive(mzd_t *A, mzp_t *P, mzp_t *Q)
167
+
168
+ # asymptotically fast PLS factorization
169
+ cdef long mzd_ple(mzd_t *A, mzp_t *P, mzp_t *Q, int cutoff)
170
+
171
+ # PLS factorization using Gray codes
172
+ cdef long _mzd_ple_russian(mzd_t *A, mzp_t *P, mzp_t *Q, int k)
173
+
174
+ # cubic PLS factorization
175
+ cdef long _mzd_ple_naive(mzd_t *A, mzp_t *P, mzp_t *Q)
176
+
177
+ # reduced row echelon form using PLUQ factorization
178
+ cdef long mzd_echelonize_pluq(mzd_t *A, int full)
179
+
180
+ # reduced row echelon form using PLUQ factorization
181
+ cdef mzd_t *mzd_kernel_left_pluq(mzd_t *A, int cutoff)
182
+
183
+ # system solving
184
+ cdef int mzd_solve_left(mzd_t *A, mzd_t *B, int cutoff, int inconsistency_check)
185
+
186
+ ########################
187
+ # Bit operations
188
+ ########################
189
+
190
+ cdef m4ri_word __M4RI_LEFT_BITMASK(int)
191
+
192
+ cdef m4ri_word m4ri_swap_bits(m4ri_word)
193
+
194
+ ##################################
195
+ # Internal Functions for Debugging
196
+ ##################################
197
+
198
+ cdef void mzd_clear_bits(mzd_t *m, int x, int y, int n)
sage/libs/m4rie.pxd ADDED
@@ -0,0 +1,206 @@
1
+ # sage_setup: distribution = sagemath-m4ri-m4rie
2
+ # distutils: extra_compile_args = -std=c++14
3
+ ##############################################################################
4
+ # Copyright (C) 2010 Martin Albrecht <martinralbrecht@googlemail.com>
5
+ # Distributed under the terms of the GNU General Public License (GPL)
6
+ # The full text of the GPL is available at:
7
+ # http://www.gnu.org/licenses/
8
+ ##############################################################################
9
+
10
+ from sage.libs.m4ri cimport mzd_t, m4ri_word, mzp_t
11
+
12
+
13
+ cdef extern from "m4rie/m4rie.h":
14
+ ctypedef struct gf2e:
15
+ int degree
16
+ m4ri_word minpoly
17
+
18
+ m4ri_word *pow_gen
19
+ m4ri_word *red
20
+
21
+ m4ri_word (*inv)(gf2e *ff, m4ri_word a)
22
+ m4ri_word (*mul)(gf2e *ff, m4ri_word a, m4ri_word b)
23
+
24
+ gf2e *gf2e_init(m4ri_word minpoly)
25
+ void gf2e_free(gf2e *ff)
26
+
27
+ #cdef extern from "m4rie/mzed.h":
28
+ ctypedef struct mzed_t:
29
+ mzd_t *x
30
+ gf2e *finite_field
31
+ int nrows
32
+ int ncols
33
+ int w
34
+
35
+ ctypedef int const_int "const int"
36
+ ctypedef size_t const_size_t "const size_t"
37
+ ctypedef mzed_t const_mzed_t "const mzed_t"
38
+
39
+ mzed_t *mzed_init(gf2e *, size_t m, size_t n)
40
+
41
+ void mzed_free(mzed_t *)
42
+
43
+ int mzed_read_elem(const_mzed_t *M, const_size_t row, const_size_t col)
44
+
45
+ void mzed_write_elem(mzed_t *, const_size_t row, const_size_t col, const_int elem)
46
+
47
+ void mzed_set_ui(mzed_t *A, m4ri_word value)
48
+
49
+ mzed_t *mzed_copy(mzed_t *o, const_mzed_t *i)
50
+
51
+ int mzed_cmp(mzed_t *l, mzed_t *r)
52
+
53
+ mzed_t *mzed_randomize(mzed_t *)
54
+
55
+ mzed_t *mzed_add(mzed_t *, mzed_t *, mzed_t *)
56
+
57
+ size_t mzed_echelonize_naive(mzed_t *, size_t)
58
+
59
+ void mzed_add_elem(mzed_t *a, const_size_t row, const_size_t col, const_int elem)
60
+
61
+ void mzed_add_multiple_of_row(mzed_t *A, size_t ar, mzed_t *B, size_t br, m4ri_word x, size_t start_col)
62
+
63
+ void mzed_rescale_row(mzed_t *A, size_t r, size_t c, m4ri_word x)
64
+
65
+ void mzed_row_swap(mzed_t *M, const_size_t rowa, const_size_t rowb)
66
+
67
+ void mzed_copy_row(mzed_t* B, size_t i, const_mzed_t* A, size_t j)
68
+
69
+ void mzed_col_swap(mzed_t *M, const_size_t cola, const_size_t colb)
70
+
71
+ void mzed_row_add(mzed_t *M, const_size_t sourcerow, const_size_t destrow)
72
+
73
+ size_t mzed_first_zero_row(mzed_t *A)
74
+
75
+ int mzed_is_zero(mzed_t *A)
76
+
77
+ void mzed_row_clear_offset(mzed_t *M, const_size_t row, const_size_t coloffset)
78
+
79
+ mzed_t *mzed_concat(mzed_t *C, const_mzed_t *A, const_mzed_t *B)
80
+
81
+ mzed_t *mzed_stack(mzed_t *C, const_mzed_t *A, const_mzed_t *B)
82
+
83
+ mzed_t *mzed_submatrix(mzed_t *S, const_mzed_t *M, size_t lowr, size_t lowc, size_t highr, size_t highc)
84
+
85
+ mzed_t *mzed_mul(mzed_t *C, const_mzed_t *A, const_mzed_t *B)
86
+
87
+ mzed_t *mzed_mul_naive(mzed_t *C, const_mzed_t *A, const_mzed_t *B)
88
+
89
+ mzed_t *mzed_mul_scalar(mzed_t *C, m4ri_word a, const_mzed_t *B)
90
+
91
+ # TODO: not implemented yet in m4rie
92
+ mzed_t *mzed_transpose(mzed_t *DST, const_mzed_t *A )
93
+
94
+ void mzed_print(const_mzed_t *M)
95
+
96
+ mzed_t *mzed_invert_newton_john(mzed_t *A, mzed_t *B)
97
+
98
+ # TODO: not implemented yet in m4rie
99
+ double mzed_density(mzed_t *A, int res)
100
+
101
+ # TODO: not implemented yet in m4rie
102
+ double _mzed_density(mzed_t *A, int res, size_t r, size_t c)
103
+
104
+ #cdef extern from "m4rie/newton_john.h":
105
+ size_t mzed_echelonize_newton_john(mzed_t *, size_t)
106
+
107
+ mzed_t *mzed_mul_newton_john(mzed_t *, mzed_t *, mzed_t *)
108
+
109
+ #cdef extern from "m4rie/echelonform.h":
110
+ size_t mzed_echelonize(mzed_t *, size_t)
111
+
112
+ size_t mzed_echelonize_ple(mzed_t *, size_t)
113
+
114
+ int mzed_ple(mzed_t *A, mzp_t *P, mzp_t *Q)
115
+
116
+ #cdef extern from "m4rie/strassen.h":
117
+ mzed_t *mzed_mul_strassen(mzed_t *, mzed_t *, mzed_t *, size_t cutoff)
118
+
119
+ size_t _mzed_strassen_cutoff(mzed_t *C, mzed_t *A, mzed_t *B)
120
+
121
+ #cdef extern from "m4rie/mzd_slice.h":
122
+
123
+ int __M4RIE_MAX_KARATSUBA_DEGREE
124
+
125
+ ctypedef struct mzd_slice_t:
126
+ mzd_t *x[16]
127
+ gf2e *finite_field
128
+ int nrows
129
+ int ncols
130
+ int depth
131
+
132
+ mzd_slice_t *mzd_slice_init(gf2e *ff, size_t m, size_t n)
133
+
134
+ void mzd_slice_free(mzd_slice_t *A)
135
+
136
+ mzed_t *mzed_cling(mzed_t *A, mzd_slice_t *Z)
137
+
138
+ mzd_slice_t *mzed_slice(mzd_slice_t *A, mzed_t *Z)
139
+
140
+ mzd_slice_t *mzd_slice_concat(mzd_slice_t *C, mzd_slice_t *A, mzd_slice_t *B)
141
+
142
+ mzd_slice_t *mzd_slice_stack(mzd_slice_t *C, mzd_slice_t *A, mzd_slice_t *B)
143
+
144
+ mzd_slice_t *mzd_slice_submatrix(mzd_slice_t *S, mzd_slice_t *A, size_t lowr, size_t lowc, size_t highr, size_t highc)
145
+
146
+ mzd_slice_t *mzd_slice_init_window(mzd_slice_t *A, size_t lowr, size_t lowc, size_t highr, size_t highc)
147
+
148
+ void mzd_slice_free_window(mzd_slice_t *A)
149
+
150
+ mzd_slice_t *_mzd_slice_add(mzd_slice_t *C, mzd_slice_t *A, mzd_slice_t *B)
151
+
152
+ mzd_slice_t *mzd_slice_add(mzd_slice_t *C, mzd_slice_t *A, mzd_slice_t *B)
153
+
154
+ void mzd_slice_randomize(mzd_slice_t *A)
155
+
156
+ mzd_slice_t *mzd_slice_copy(mzd_slice_t *B, mzd_slice_t *A)
157
+
158
+ void mzd_slice_set_ui(mzd_slice_t *A, m4ri_word value)
159
+
160
+ m4ri_word mzd_slice_read_elem(mzd_slice_t *A, size_t row, size_t col)
161
+
162
+ void mzd_slice_add_elem(mzd_slice_t *A, size_t row, size_t col, m4ri_word elem)
163
+
164
+ void mzd_slice_write_elem(mzd_slice_t *A, size_t row, size_t col, m4ri_word elem)
165
+
166
+ int mzd_slice_cmp(mzd_slice_t *A, mzd_slice_t *B)
167
+
168
+ int mzd_slice_is_zero(mzd_slice_t *A)
169
+
170
+ void mzd_slice_rescale_row(mzd_slice_t *A, size_t r, size_t c, m4ri_word x)
171
+
172
+ void mzd_slice_row_swap(mzd_slice_t *A, size_t rowa, size_t rowb)
173
+
174
+ void mzd_slice_copy_row(mzd_slice_t* B, size_t i, mzd_slice_t* A, size_t j)
175
+
176
+ void mzd_slice_col_swap(mzd_slice_t *A, size_t cola, size_t colb)
177
+
178
+ void mzd_slice_row_add(mzd_slice_t *A, size_t sourcerow, size_t destrow)
179
+
180
+ void mzd_slice_row_clear_offset(mzd_slice_t *A, size_t row, size_t coloffset)
181
+
182
+ void mzd_slice_print(mzd_slice_t *A)
183
+
184
+ mzd_slice_t *_mzed_slice2(mzd_slice_t *A, mzed_t *Z)
185
+
186
+ mzd_slice_t *mzed_slice2(mzd_slice_t *A, mzed_t *Z)
187
+
188
+ mzd_slice_t *_mzed_slice4(mzd_slice_t *A, mzed_t *Z)
189
+
190
+ mzed_t *_mzed_cling2(mzed_t *A, mzd_slice_t *Z)
191
+
192
+ mzed_t* mzed_cling2(mzed_t *A, mzd_slice_t *Z)
193
+
194
+ mzed_t *_mzed_cling4(mzed_t *A, mzd_slice_t *Z)
195
+
196
+ mzed_t* mzed_cling4(mzed_t *A, mzd_slice_t *Z)
197
+
198
+ mzed_t *mzed_mul_karatsuba(mzed_t *C, mzed_t *A, mzed_t *B)
199
+
200
+ mzed_t *mzed_addmul_karatsuba(mzed_t *C, mzed_t *A, mzed_t *B)
201
+
202
+ mzed_t *_mzed_mul_karatsuba(mzed_t *C, mzed_t *A, mzed_t *B)
203
+
204
+ mzd_slice_t *_mzd_slice_mul_karatsuba2(mzd_slice_t *C, mzd_slice_t *A, mzd_slice_t *B)
205
+
206
+ mzd_slice_t *_mzd_slice_mul_karatsuba3(mzd_slice_t *C, mzd_slice_t *A, mzd_slice_t *B)
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-m4ri-m4rie
@@ -0,0 +1,14 @@
1
+ # sage_setup: distribution = sagemath-m4ri-m4rie
2
+ from sage.libs.m4rie cimport mzed_t
3
+ from sage.libs.m4ri cimport m4ri_word
4
+ from sage.matrix.matrix_dense cimport Matrix_dense
5
+
6
+
7
+ cdef class Matrix_gf2e_dense(Matrix_dense):
8
+ cdef mzed_t *_entries
9
+ cdef object _one
10
+ cdef object _zero
11
+
12
+ cpdef Matrix_gf2e_dense _multiply_newton_john(Matrix_gf2e_dense self, Matrix_gf2e_dense right)
13
+ cpdef Matrix_gf2e_dense _multiply_karatsuba(Matrix_gf2e_dense self, Matrix_gf2e_dense right)
14
+ cpdef Matrix_gf2e_dense _multiply_strassen(Matrix_gf2e_dense self, Matrix_gf2e_dense right, cutoff=*)