passagemath-tdlib 10.5.36__cp312-cp312-macosx_13_0_x86_64.whl → 10.6.12__cp312-cp312-macosx_13_0_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-tdlib might be problematic. Click here for more details.

@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: passagemath-tdlib
3
- Version: 10.5.36
3
+ Version: 10.6.12
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
7
- License: GNU General Public License (GPL) v2 or later
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
@@ -16,20 +16,23 @@ Project-URL: tracker, https://github.com/passagemath/passagemath/issues
16
16
  Classifier: Development Status :: 6 - Mature
17
17
  Classifier: Intended Audience :: Education
18
18
  Classifier: Intended Audience :: Science/Research
19
- Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
20
19
  Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
21
21
  Classifier: Operating System :: MacOS :: MacOS X
22
22
  Classifier: Programming Language :: Python :: 3 :: Only
23
- Classifier: Programming Language :: Python :: 3.9
24
23
  Classifier: Programming Language :: Python :: 3.10
25
24
  Classifier: Programming Language :: Python :: 3.11
26
25
  Classifier: Programming Language :: Python :: 3.12
27
26
  Classifier: Programming Language :: Python :: 3.13
28
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
29
28
  Classifier: Topic :: Scientific/Engineering :: Mathematics
30
- Requires-Python: <3.14,>=3.9
29
+ Requires-Python: <3.14,>=3.10
31
30
  Description-Content-Type: text/x-rst
32
- Requires-Dist: cysignals==1.12.0rc2
31
+ Requires-Dist: cysignals<1.12.4; sys_platform == "win32"
32
+ Requires-Dist: cysignals!=1.12.0,>=1.11.2
33
+ Provides-Extra: test
34
+ Requires-Dist: passagemath-repl; extra == "test"
35
+ Requires-Dist: passagemath-graphs; extra == "test"
33
36
 
34
37
  ========================================================================
35
38
  passagemath: Tree decompositions with tdlib
@@ -43,45 +46,47 @@ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
43
46
  developed 2005-2025 under the motto “Creating a Viable Open Source
44
47
  Alternative to Magma, Maple, Mathematica, and MATLAB”.
45
48
 
46
- The passagemath fork was created in October 2024 with the following
47
- goals:
49
+ The passagemath fork uses the motto "Creating a Free Passage Between the
50
+ Scientific Python Ecosystem and Mathematical Software Communities."
51
+ It was created in October 2024 with the following goals:
48
52
 
49
- - providing modularized installation with pip, thus completing a `major
50
- project started in 2020 in the Sage
51
- codebase <https://github.com/sagemath/sage/issues/29705>`__,
53
+ - providing modularized installation with pip,
52
54
  - establishing first-class membership in the scientific Python
53
55
  ecosystem,
54
56
  - giving `clear attribution of upstream
55
57
  projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
56
58
  - providing independently usable Python interfaces to upstream
57
59
  libraries,
58
- - providing `platform portability and integration testing
60
+ - offering `platform portability and integration testing
59
61
  services <https://github.com/passagemath/passagemath/issues/704>`__
60
62
  to upstream projects,
61
63
  - inviting collaborations with upstream projects,
62
64
  - `building a professional, respectful, inclusive
63
65
  community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
66
+ - `empowering Sage users to participate in the scientific Python ecosystem
67
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
64
68
  - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
65
69
  serverless deployment with Javascript,
66
70
  - developing a native Windows port.
67
71
 
68
- `Full documentation <https://doc.sagemath.org/html/en/index.html>`__ is
72
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
69
73
  available online.
70
74
 
71
- passagemath attempts to support all major Linux distributions and recent versions of
72
- macOS. Use on Windows currently requires the use of Windows Subsystem for Linux or
73
- virtualization.
75
+ passagemath attempts to support and provides binary wheels suitable for
76
+ all major Linux distributions and recent versions of macOS.
74
77
 
75
- Complete sets of binary wheels are provided on PyPI for Python versions 3.9.x-3.12.x.
76
- Python 3.13.x is also supported, but some third-party packages are still missing wheels,
77
- so compilation from source is triggered for those.
78
+ Binary wheels for native Windows (x86_64) are are available for a subset of
79
+ the passagemath distributions. Use of the full functionality of passagemath
80
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
81
+ or virtualization.
82
+
83
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.13.x.
78
84
 
79
85
 
80
86
  About this pip-installable distribution package
81
87
  -----------------------------------------------
82
88
 
83
- This pip-installable source distribution ``sagemath-tdlib`` is a small
84
- optional distribution for use with ``sagemath-standard``.
89
+ This pip-installable distribution ``passagemath-tdlib`` is a small optional distribution for use with `passagemath-graphs <https://pypi.org/project/passagemath-graphs>`_.
85
90
 
86
- It provides a Cython interface to the ``tdlib`` library, providing
91
+ It provides a Cython interface to the ``tdlib`` library, now also known as `treedec <https://gitlab.com/freetdi/treedec>`_, providing
87
92
  algorithms concerning tree decompositions.
@@ -0,0 +1,9 @@
1
+ passagemath_tdlib-10.6.12.dist-info/RECORD,,
2
+ passagemath_tdlib-10.6.12.dist-info/WHEEL,sha256=teO2xh-FJ1HNVGe5DhoP69xaQDzWk7o1JLSQ2CMfYdA,137
3
+ passagemath_tdlib-10.6.12.dist-info/top_level.txt,sha256=Kmzulf9WsphADFQuqgvdy5mvTLDj_V2zkFHU2s3UXos,6
4
+ passagemath_tdlib-10.6.12.dist-info/METADATA,sha256=z6KetktGHLmcXT0OOoBpqUa4JO76LLE0AVZL1g_G39I,4498
5
+ sage/all__sagemath_tdlib.py,sha256=zag9UqFlkcjkiBCrkeLRFIXjnemsqnpTNJFfqQMezKE,64
6
+ sage/graphs/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
7
+ sage/graphs/graph_decompositions/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
8
+ sage/graphs/graph_decompositions/tdlib.pyx,sha256=O11Mem19-4WuyNAfnL_9ZLuWv_CKiO7SLyDlI94DQDo,5381
9
+ sage/graphs/graph_decompositions/tdlib.cpython-312-darwin.so,sha256=E_sM-KBTc9jr5Tjxszk4wh1WbMZ7I7AbU086-EaJPeM,346024
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-macosx_13_0_x86_64
5
5
  Generator: delocate 0.13.0
@@ -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++11
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,8 +0,0 @@
1
- passagemath_tdlib-10.5.36.dist-info/RECORD,,
2
- passagemath_tdlib-10.5.36.dist-info/WHEEL,sha256=WumuUiKnsVlJAe98ANgXLT4RhQv0g6g1ZTiVkGnKx7A,137
3
- passagemath_tdlib-10.5.36.dist-info/top_level.txt,sha256=hibFyzQHiLOMK68qL1OWsNKaXOmSXqZjeLTBem6Yy7I,5
4
- passagemath_tdlib-10.5.36.dist-info/METADATA,sha256=mcRZmJuemkeU6jp7AUy6aZOhoLsp69ILLQ8ED7sQw-c,4082
5
- sage/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
6
- sage/graphs/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
7
- sage/graphs/graph_decompositions/all__sagemath_tdlib.py,sha256=xwEAp-3HSleZKAjcgudzEBoWekMyMSx7mY9lzHCETcU,44
8
- sage/graphs/graph_decompositions/tdlib.cpython-312-darwin.so,sha256=xwrFDqByjrUFCmC5BZx8M785FoJSK20QEF5iT5cBmZ4,344872