passagemath-tdlib 10.5.41__cp311-cp311-musllinux_1_2_x86_64.whl → 10.6.40__cp311-cp311-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.
@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-tdlib
2
+
3
+ from sage.all__sagemath_tdlib import *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: passagemath-tdlib
3
- Version: 10.5.41
3
+ Version: 10.6.40
4
4
  Summary: passagemath: Tree decompositions with tdlib
5
5
  Author-email: The Sage Developers <sage-support@googlegroups.com>
6
6
  Maintainer: Matthias Köppe, passagemath contributors
@@ -8,7 +8,7 @@ License-Expression: GPL-2.0-or-later
8
8
  Project-URL: release notes, https://github.com/passagemath/passagemath/releases
9
9
  Project-URL: repo (upstream), https://github.com/sagemath/sage
10
10
  Project-URL: repo, https://github.com/passagemath/passagemath
11
- Project-URL: documentation, https://doc.sagemath.org
11
+ Project-URL: documentation, https://passagemath.org/docs/latest
12
12
  Project-URL: homepage (upstream), https://www.sagemath.org
13
13
  Project-URL: discourse, https://passagemath.discourse.group
14
14
  Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
@@ -17,18 +17,23 @@ Classifier: Development Status :: 6 - Mature
17
17
  Classifier: Intended Audience :: Education
18
18
  Classifier: Intended Audience :: Science/Research
19
19
  Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
20
21
  Classifier: Operating System :: MacOS :: MacOS X
21
22
  Classifier: Programming Language :: Python :: 3 :: Only
22
- Classifier: Programming Language :: Python :: 3.9
23
23
  Classifier: Programming Language :: Python :: 3.10
24
24
  Classifier: Programming Language :: Python :: 3.11
25
25
  Classifier: Programming Language :: Python :: 3.12
26
26
  Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: 3.14
27
28
  Classifier: Programming Language :: Python :: Implementation :: CPython
28
29
  Classifier: Topic :: Scientific/Engineering :: Mathematics
29
- Requires-Python: <3.14,>=3.9
30
+ Requires-Python: <3.15,>=3.10
30
31
  Description-Content-Type: text/x-rst
32
+ Requires-Dist: cysignals!=1.12.4; sys_platform == "win32"
31
33
  Requires-Dist: cysignals!=1.12.0,>=1.11.2
34
+ Provides-Extra: test
35
+ Requires-Dist: passagemath-repl; extra == "test"
36
+ Requires-Dist: passagemath-graphs; extra == "test"
32
37
 
33
38
  ========================================================================
34
39
  passagemath: Tree decompositions with tdlib
@@ -42,45 +47,47 @@ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
42
47
  developed 2005-2025 under the motto “Creating a Viable Open Source
43
48
  Alternative to Magma, Maple, Mathematica, and MATLAB”.
44
49
 
45
- The passagemath fork was created in October 2024 with the following
46
- goals:
50
+ The passagemath fork uses the motto "Creating a Free Passage Between the
51
+ Scientific Python Ecosystem and Mathematical Software Communities."
52
+ It was created in October 2024 with the following goals:
47
53
 
48
- - providing modularized installation with pip, thus completing a `major
49
- project started in 2020 in the Sage
50
- codebase <https://github.com/sagemath/sage/issues/29705>`__,
54
+ - providing modularized installation with pip,
51
55
  - establishing first-class membership in the scientific Python
52
56
  ecosystem,
53
57
  - giving `clear attribution of upstream
54
58
  projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
55
59
  - providing independently usable Python interfaces to upstream
56
60
  libraries,
57
- - providing `platform portability and integration testing
61
+ - offering `platform portability and integration testing
58
62
  services <https://github.com/passagemath/passagemath/issues/704>`__
59
63
  to upstream projects,
60
64
  - inviting collaborations with upstream projects,
61
65
  - `building a professional, respectful, inclusive
62
66
  community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
67
+ - `empowering Sage users to participate in the scientific Python ecosystem
68
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
63
69
  - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
64
70
  serverless deployment with Javascript,
65
71
  - developing a native Windows port.
66
72
 
67
- `Full documentation <https://doc.sagemath.org/html/en/index.html>`__ is
73
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
68
74
  available online.
69
75
 
70
- passagemath attempts to support all major Linux distributions and recent versions of
71
- macOS. Use on Windows currently requires the use of Windows Subsystem for Linux or
72
- virtualization.
76
+ passagemath attempts to support and provides binary wheels suitable for
77
+ all major Linux distributions and recent versions of macOS.
73
78
 
74
- Complete sets of binary wheels are provided on PyPI for Python versions 3.9.x-3.12.x.
75
- Python 3.13.x is also supported, but some third-party packages are still missing wheels,
76
- so compilation from source is triggered for those.
79
+ Binary wheels for native Windows (x86_64) are are available for a subset of
80
+ the passagemath distributions. Use of the full functionality of passagemath
81
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
82
+ or virtualization.
83
+
84
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.13.x.
77
85
 
78
86
 
79
87
  About this pip-installable distribution package
80
88
  -----------------------------------------------
81
89
 
82
- This pip-installable source distribution ``sagemath-tdlib`` is a small
83
- optional distribution for use with ``sagemath-standard``.
90
+ This pip-installable distribution ``passagemath-tdlib`` is a small optional distribution for use with `passagemath-graphs <https://pypi.org/project/passagemath-graphs>`_.
84
91
 
85
- It provides a Cython interface to the ``tdlib`` library, providing
92
+ It provides a Cython interface to the ``tdlib`` library, now also known as `treedec <https://gitlab.com/freetdi/treedec>`_, providing
86
93
  algorithms concerning tree decompositions.
@@ -0,0 +1,12 @@
1
+ passagemath_tdlib/__init__.py,sha256=pkf9WFBA6Z19IKlZZV-KQCzF-WoaEoYoiTPH6nRpfUo,84
2
+ passagemath_tdlib.libs/libgcc_s-0cd532bd.so.1,sha256=QrXyyMoT5eFz2Df1EXoEtsBCQ3VIESveeHklGujc_48,183337
3
+ passagemath_tdlib.libs/libstdc++-5d72f927.so.6.0.33,sha256=i_QxuLSNJcDImiug4WsF5wNgprWyeL3Mc09ILo-0-Dc,3564129
4
+ sage/all__sagemath_tdlib.py,sha256=zag9UqFlkcjkiBCrkeLRFIXjnemsqnpTNJFfqQMezKE,64
5
+ sage/graphs/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
6
+ sage/graphs/graph_decompositions/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
7
+ sage/graphs/graph_decompositions/tdlib.cpython-311-x86_64-linux-musl.so,sha256=9KsJvu-F1Tygj4YGdhzZjUDVffY95QPk1JLuYpguP0Y,5595937
8
+ sage/graphs/graph_decompositions/tdlib.pyx,sha256=hTSyIq_Va3AV1GzwepFuTGzNC77BhtPvSlLj1lOmM8M,5381
9
+ passagemath_tdlib-10.6.40.dist-info/METADATA,sha256=WRibYeiWDwV457WU1PIuFugWzpwIjl-D4S9qK6fCIro,4550
10
+ passagemath_tdlib-10.6.40.dist-info/WHEEL,sha256=kA_iIvT-cxTFNl4I8QDfFHN1DAyqZDYakVXCaObxeLo,112
11
+ passagemath_tdlib-10.6.40.dist-info/top_level.txt,sha256=udVnGv8qRS4FCMdRgHx9y78553ikEdpWqhJa1_KYX-I,24
12
+ passagemath_tdlib-10.6.40.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_tdlib
3
+ sage
@@ -1 +1,2 @@
1
1
  # sage_setup: distribution = sagemath-tdlib
2
+ # delvewheel: patch
@@ -0,0 +1,185 @@
1
+ # distutils: language = c++
2
+ # distutils: extra_compile_args = -std=c++17
3
+ # sage_setup: distribution = sagemath-tdlib
4
+
5
+ r"""
6
+ Interface with TdLib (algorithms for tree decompositions)
7
+
8
+ This module defines functions based on TdLib, a library that implements
9
+ algorithms for tree decompositions written by Lukas Larisch.
10
+
11
+ **Definition** :
12
+
13
+ A `tree decomposition` of a graph `G` is a pair `(T, \beta)` consisting of a
14
+ tree T and a function `\beta: V(T) \rightarrow 2^{V(G)}` associating with each
15
+ node `t \in V(T)` a set of vertices `\beta (t) \subseteq V(G)` such that
16
+
17
+ * (T1) for every edge `e \in E(G)` there is a node `t \in V(T)` with `e
18
+ \subseteq \beta (t)`, and
19
+
20
+ * (T2) for all `v \in V(G)` the set `\beta^{-1} := \{t \in V(T): v \in \beta
21
+ (t)\}` is non-empty and connected in T.
22
+
23
+ The width of `(T, \beta)` is defined as `max\{|\beta (t)|-1: t \in V(T) \}`.
24
+ The treewidth of G is defined as the minimum width over all tree decompositions
25
+ of `G`.
26
+
27
+ **Some known results** :
28
+
29
+ - Trees have treewidth 1
30
+
31
+ - Cycles have treewidth 2
32
+
33
+ - Series-parallel graphs have treewidth at most 2
34
+
35
+ - Cliques must be contained in some bag of a tree decomposition
36
+
37
+ Computing the treewidth or a tree decomposition of a given graph is NP-hard in
38
+ general.
39
+
40
+ **This module contains the following functions** :
41
+
42
+ .. csv-table::
43
+ :class: contentstable
44
+ :widths: 30, 70
45
+ :delim: |
46
+
47
+ :meth:`treedecomposition_exact` | Compute a tree decomposition of exact width
48
+ :meth:`get_width` | Return the width of a given tree decomposition
49
+
50
+
51
+ AUTHOR: Lukas Larisch (10-25-2015): Initial version
52
+
53
+ REFERENCE:
54
+
55
+ - [ST1993]_
56
+
57
+ - [AP1986]_
58
+
59
+ - [Bod1993]_
60
+
61
+ Methods
62
+ -------
63
+ """
64
+
65
+ from libcpp.vector cimport vector
66
+ from cysignals.signals cimport sig_on, sig_off
67
+
68
+ from sage.sets.set import Set
69
+ from sage.graphs.graph import Graph
70
+
71
+ cdef extern from "sage_tdlib.cpp":
72
+ int sage_exact_decomposition(vector[unsigned int] &V_G, vector[unsigned int] &E_G, vector[vector[int]] &V_T, vector[unsigned int] &E_T, int lb)
73
+
74
+
75
+ ##############################################################
76
+ # ########## GRAPH/DECOMPOSITION ENCODING/DECODING ###########
77
+ # the following will be used implicitly to do the translation
78
+ # between Sage graph encoding and BGL graph encoding.
79
+
80
+ cdef make_tdlib_graph(G, vertex_to_int, vector[unsigned int] &V, vector[unsigned int] &E) noexcept:
81
+ for i in range(G.order()):
82
+ V.push_back(i)
83
+
84
+ for u, v in G.edge_iterator(labels=False):
85
+ E.push_back(vertex_to_int[u])
86
+ E.push_back(vertex_to_int[v])
87
+
88
+
89
+ cdef make_sage_decomp(G, vector[vector[int]] &V, vector[unsigned int] &E, int_to_vertex) noexcept:
90
+ cdef int i, j
91
+ for i in range(len(V)):
92
+ G.add_vertex(Set([int_to_vertex[j] for j in V[i]]))
93
+
94
+ for i in range(0, len(E), 2):
95
+ G.add_edge(Set([int_to_vertex[j] for j in V[E[i]]]), Set([int_to_vertex[j] for j in V[E[i+1]]]))
96
+
97
+
98
+ ##############################################################
99
+ # ########## EXACT ALGORITHMS ################################
100
+
101
+ def treedecomposition_exact(G, lb=-1):
102
+ r"""
103
+ Compute a tree decomposition of exact width.
104
+
105
+ The returned tree decomposition is exact iff the given lower bound is not
106
+ greater than the treewidth of the input graph. Otherwise a tree
107
+ decomposition of a width than matches the given lower bound will be
108
+ computed.
109
+
110
+ INPUT:
111
+
112
+ - ``G`` -- a generic graph
113
+
114
+ - ``lb`` -- integer (default: -1); a lower bound to the treewidth of G,
115
+ e.g. computed by lower_bound
116
+
117
+ OUTPUT:
118
+
119
+ A tree decomposition of ``G`` of ``tw(G)``, if the lower bound was not
120
+ greater than ``tw(G)``, otherwise a tree decomposition of ``width = lb``.
121
+
122
+ .. WARNING::
123
+
124
+ The computation can take a lot of time for a graph `G` on more than
125
+ about 30 vertices and `tw(G) > 3`.
126
+
127
+ EXAMPLES::
128
+
129
+ sage: # optional - tdlib
130
+ sage: import sage.graphs.graph_decompositions.tdlib as tdlib
131
+ sage: G = graphs.HouseGraph()
132
+ sage: T = tdlib.treedecomposition_exact(G)
133
+ sage: T.show(vertex_size=2000) # needs sage.plot
134
+
135
+ TESTS::
136
+
137
+ sage: # optional - tdlib
138
+ sage: import sage.graphs.graph_decompositions.tdlib as tdlib
139
+ sage: G = graphs.HouseGraph()
140
+ sage: T = tdlib.treedecomposition_exact(G)
141
+ sage: G = graphs.PetersenGraph()
142
+ sage: T = tdlib.treedecomposition_exact(G)
143
+ """
144
+ cdef vector[unsigned int] V_G, E_G, E_T
145
+ cdef vector[vector[int]] V_T
146
+
147
+ cdef list int_to_vertex = list(G)
148
+ cdef dict vertex_to_int = {v: i for i, v in enumerate(G)}
149
+
150
+ make_tdlib_graph(G, vertex_to_int, V_G, E_G)
151
+
152
+ cdef int c_lb = lb
153
+
154
+ sig_on()
155
+ sage_exact_decomposition(V_G, E_G, V_T, E_T, c_lb)
156
+ sig_off()
157
+
158
+ T = Graph(name="Tree decomposition")
159
+ make_sage_decomp(T, V_T, E_T, int_to_vertex)
160
+
161
+ return T
162
+
163
+
164
+ def get_width(T):
165
+ """
166
+ Return the width of a given tree decomposition.
167
+
168
+ The width of a tree decompositions is the maximal size of a bag minus one.
169
+
170
+ INPUT:
171
+
172
+ - ``T`` -- a tree decomposition
173
+
174
+ OUTPUT: the width of ``T``
175
+
176
+ EXAMPLES::
177
+
178
+ sage: # optional - tdlib
179
+ sage: import sage.graphs.graph_decompositions.tdlib as tdlib
180
+ sage: G = graphs.PetersenGraph()
181
+ sage: T = tdlib.treedecomposition_exact(G)
182
+ sage: tdlib.get_width(T)
183
+ 4
184
+ """
185
+ return (max(len(x) for x in T) - 1) if T else -1
@@ -1,10 +0,0 @@
1
- passagemath_tdlib.libs/libgcc_s-2298274a.so.1,sha256=V2IJwfUuwSSQhJqB29JtMx8hH79dCRjAvTQIGWShH-s,181737
2
- passagemath_tdlib.libs/libstdc++-08d5c7eb.so.6.0.33,sha256=k0S_imrCh_IE6WpvxrLoVPYiRyMVf15RDWRiXPIywV8,3562401
3
- sage/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
4
- sage/graphs/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
5
- sage/graphs/graph_decompositions/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
6
- sage/graphs/graph_decompositions/tdlib.cpython-311-x86_64-linux-musl.so,sha256=NyaqGJBk2otnf_6pxrIXJzmHa0n5rd9-Cqv58-Jp4YU,5507465
7
- passagemath_tdlib-10.5.41.dist-info/METADATA,sha256=110IIHiIEhbd87tyh_P-ZxD191J1WIDFlULxZJ1KZn4,3984
8
- passagemath_tdlib-10.5.41.dist-info/WHEEL,sha256=kA_iIvT-cxTFNl4I8QDfFHN1DAyqZDYakVXCaObxeLo,112
9
- passagemath_tdlib-10.5.41.dist-info/top_level.txt,sha256=hibFyzQHiLOMK68qL1OWsNKaXOmSXqZjeLTBem6Yy7I,5
10
- passagemath_tdlib-10.5.41.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- sage