passagemath-homfly 10.4.47__cp312-cp312-macosx_13_0_x86_64.whl → 10.8.1a1__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.
Binary file
@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-homfly
2
+
3
+ from sage.all__sagemath_homfly import *
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: passagemath-homfly
3
+ Version: 10.8.1a1
4
+ Summary: passagemath: Homfly polynomials of knots/links with libhomfly
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.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Programming Language :: Python :: 3.14
29
+ Classifier: Programming Language :: Python :: Implementation :: CPython
30
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
31
+ Requires-Python: <3.15,>=3.11
32
+ Description-Content-Type: text/x-rst
33
+ Requires-Dist: cysignals!=1.12.4; sys_platform == "win32"
34
+ Requires-Dist: cysignals!=1.12.0,>=1.11.2
35
+ Provides-Extra: test
36
+ Requires-Dist: passagemath-graphs; extra == "test"
37
+ Requires-Dist: passagemath-repl; extra == "test"
38
+
39
+ ==========================================================================================
40
+ passagemath: Homfly polynomials of knots/links with libhomfly
41
+ ==========================================================================================
42
+
43
+ `passagemath <https://github.com/passagemath/passagemath>`__ is open
44
+ source mathematical software in Python, released under the GNU General
45
+ Public Licence GPLv2+.
46
+
47
+ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
48
+ developed 2005-2025 under the motto “Creating a Viable Open Source
49
+ Alternative to Magma, Maple, Mathematica, and MATLAB”.
50
+
51
+ The passagemath fork uses the motto "Creating a Free Passage Between the
52
+ Scientific Python Ecosystem and Mathematical Software Communities."
53
+ It was created in October 2024 with the following goals:
54
+
55
+ - providing modularized installation with pip,
56
+ - establishing first-class membership in the scientific Python
57
+ ecosystem,
58
+ - giving `clear attribution of upstream
59
+ projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
60
+ - providing independently usable Python interfaces to upstream
61
+ libraries,
62
+ - offering `platform portability and integration testing
63
+ services <https://github.com/passagemath/passagemath/issues/704>`__
64
+ to upstream projects,
65
+ - inviting collaborations with upstream projects,
66
+ - `building a professional, respectful, inclusive
67
+ community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
68
+ - `empowering Sage users to participate in the scientific Python ecosystem
69
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
70
+ - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
71
+ serverless deployment with Javascript,
72
+ - developing a native Windows port.
73
+
74
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
75
+ available online.
76
+
77
+ passagemath attempts to support and provides binary wheels suitable for
78
+ all major Linux distributions and recent versions of macOS.
79
+
80
+ Binary wheels for native Windows (x86_64) are are available for a subset of
81
+ the passagemath distributions. Use of the full functionality of passagemath
82
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
83
+ or virtualization.
84
+
85
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.14.x.
86
+
87
+
88
+ About this pip-installable distribution package
89
+ -----------------------------------------------
90
+
91
+ This pip-installable distribution ``passagemath-homfly`` provides a Cython interface
92
+ to the `libhomfly <https://github.com/miguelmarco/libhomfly>`_ library.
93
+
94
+
95
+ What is included
96
+ ----------------
97
+
98
+ * `sage.libs.homfly <https://github.com/passagemath/passagemath/blob/main/src/sage/libs/homfly.pyx>`_
99
+
100
+
101
+ Examples
102
+ --------
103
+
104
+ ::
105
+
106
+ $ pipx run --pip-args="--prefer-binary" --spec "passagemath-homfly[test]" ipython
107
+
108
+ In [1]: from sage.libs.homfly import homfly_polynomial_dict
109
+
110
+ In [2]: trefoil = '1 6 0 1 1 -1 2 1 0 -1 1 1 2 -1 0 1 1 1 2 1'
111
+
112
+ In [3]: homfly_polynomial_dict(trefoil)
113
+ Out[3]: {(-4, 0): -1, (-2, 0): -2, (-2, 2): 1}
@@ -0,0 +1,11 @@
1
+ passagemath_homfly-10.8.1a1.dist-info/RECORD,,
2
+ passagemath_homfly-10.8.1a1.dist-info/WHEEL,sha256=AbrL460eTpF3P_Yx79_4q0erG2pYqVvEIQ8yrjvNRyg,155
3
+ passagemath_homfly-10.8.1a1.dist-info/top_level.txt,sha256=MBew0hgloNn4j2ZkYrRV9cJmjL2LALohdPPW3Qai1Cc,25
4
+ passagemath_homfly-10.8.1a1.dist-info/METADATA,sha256=aMambPRUYlCcR1anPAJsq1N9sGJRu9Fjn9-B0GOkhWw,4969
5
+ passagemath_homfly/__init__.py,sha256=fMNOe_XkLgPa4znvxGJNQQCbdWVGlOyMm4d4z8evh10,86
6
+ passagemath_homfly/.dylibs/libgc.1.dylib,sha256=imDFNxTFgPJn37KVASzMG7nuW3k3VOeR04vauQuNOPI,251728
7
+ passagemath_homfly/.dylibs/libhomfly.0.0.0.dylib,sha256=FTWyUI4vVHmlD6l0Oe4KTeIEHbRXV8zsu3VcZREz7eg,38752
8
+ sage/all__sagemath_homfly.py,sha256=F63UPkJOfraoStQNe-1tYDqhjd-siF5P04FcMv4yRcg,106
9
+ sage/libs/homfly.pyx,sha256=RKaj10MXyfdAIqnDec18931GnQrOSPATo92NsdPNCe8,2988
10
+ sage/libs/all__sagemath_homfly.py,sha256=acUGFX0Wx4P0uJwgj5m9ANtfRaZriA7rgY4-VlJE8xc,45
11
+ sage/libs/homfly.cpython-312-darwin.so,sha256=vgRYPrGIyUcnELQx6SZNOc7iCrnFKWrBxcj66XL2AwU,76368
@@ -1,5 +1,6 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-macosx_13_0_x86_64
5
+ Generator: delocate 0.13.1.dev42+ga0af70b54
5
6
 
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_homfly
3
+ sage
@@ -1 +1,4 @@
1
1
  # sage_setup: distribution = sagemath-homfly
2
+ # delvewheel: patch
3
+
4
+ from sage.all__sagemath_graphs import *
Binary file
sage/libs/homfly.pyx ADDED
@@ -0,0 +1,104 @@
1
+ # sage_setup: distribution = sagemath-homfly
2
+ # distutils: libraries = homfly gc
3
+ r"""
4
+ Cython wrapper for libhomfly library
5
+
6
+ This is used to call the libhomfly library directly from python. Knots
7
+ and links are passed following the convention in libhomfly. It is basically
8
+ the oriented Gauss code, represented as a string of integers separated
9
+ by spaces as follows:
10
+
11
+ - how many strings,
12
+
13
+ - for each string, how many crossings, then
14
+
15
+ - for each crossing, the cross name, then `1` if over, `-1` if under
16
+
17
+ - for each crossing, the name of the crossing and `1` if right, `-1` if left.
18
+
19
+ If there are `n` crossings, they must be named `0, 1, ..., n-1`.
20
+
21
+ AUTHORS:
22
+
23
+ - Miguel Marco (2015-03-24): initial version.
24
+ """
25
+
26
+ # ****************************************************************************
27
+ # Copyright (C) 2015 Miguel Marco <mmarco@unizar.es>
28
+ #
29
+ # Distributed under the terms of the GNU General Public License (GPL)
30
+ # as published by the Free Software Foundation; either version 2 of
31
+ # the License, or (at youroption) any later version.
32
+ # https://www.gnu.org/licenses/
33
+ # ****************************************************************************
34
+
35
+ from cysignals.signals cimport sig_on, sig_off
36
+
37
+ from sage.cpython.string cimport str_to_bytes, char_to_str
38
+
39
+ cdef extern from "homfly.h":
40
+ ctypedef int word
41
+ ctypedef signed long int sb4
42
+ ctypedef unsigned short int ub2
43
+ ctypedef signed short int sb2
44
+ struct Term:
45
+ sb4 coef
46
+ sb2 m
47
+ sb2 l
48
+ struct Poly:
49
+ Term* term
50
+ sb4 len
51
+ Poly* homfly(char *argv)
52
+ char* homfly_str(char *argv)
53
+
54
+
55
+ def homfly_polynomial_string(link):
56
+ r"""
57
+ Return the HOMFLY polynomial of a link.
58
+
59
+ INPUT:
60
+
61
+ - ``link`` -- string of space-separated integers representing the link
62
+
63
+ OUTPUT: string with the HOMFLY polynomial in the variables `M` and `L`
64
+
65
+ EXAMPLES::
66
+
67
+ sage: from sage.libs.homfly import homfly_polynomial_string
68
+ sage: trefoil = '1 6 0 1 1 -1 2 1 0 -1 1 1 2 -1 0 1 1 1 2 1'
69
+ sage: homfly_polynomial_string(trefoil)
70
+ ' - L^-4 - 2L^-2 + M^2L^-2'
71
+ """
72
+ link = str_to_bytes(link)
73
+ sig_on()
74
+ cdef char* c_output = homfly_str(link)
75
+ sig_off()
76
+ return char_to_str(c_output)
77
+
78
+
79
+ def homfly_polynomial_dict(link):
80
+ """
81
+ Return a dictionary representing the HOMFLY polynomial of a link.
82
+
83
+ INPUT:
84
+
85
+ - ``link`` -- string of space-separated integers representing the link
86
+
87
+ EXAMPLES::
88
+
89
+ sage: from sage.libs.homfly import homfly_polynomial_dict
90
+ sage: trefoil = '1 6 0 1 1 -1 2 1 0 -1 1 1 2 -1 0 1 1 1 2 1'
91
+ sage: homfly_polynomial_dict(trefoil)
92
+ {(-4, 0): -1, (-2, 0): -2, (-2, 2): 1}
93
+ """
94
+ link = str_to_bytes(link)
95
+ cdef Term ter
96
+ sig_on()
97
+ cdef Poly* c_output = homfly(link)
98
+ sig_off()
99
+ cdef int l = c_output.len
100
+ d = {}
101
+ for i in range(l):
102
+ ter = c_output.term[i]
103
+ d[(int(ter.l), int(ter.m))] = int(ter.coef)
104
+ return d
@@ -1,60 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: passagemath-homfly
3
- Version: 10.4.47
4
- Summary: passagemath: Homfly polynomials of knots/links with libhomfly
5
- Author-email: The Sage Developers <sage-support@googlegroups.com>
6
- Maintainer: Matthias Köppe, passagemath contributors
7
- License: GNU General Public License (GPL) v2 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://doc.sagemath.org
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: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
20
- Classifier: Operating System :: POSIX
21
- Classifier: Operating System :: MacOS :: MacOS X
22
- Classifier: Programming Language :: Python :: 3 :: Only
23
- Classifier: Programming Language :: Python :: 3.9
24
- Classifier: Programming Language :: Python :: 3.10
25
- Classifier: Programming Language :: Python :: 3.11
26
- Classifier: Programming Language :: Python :: 3.12
27
- Classifier: Programming Language :: Python :: Implementation :: CPython
28
- Classifier: Topic :: Scientific/Engineering :: Mathematics
29
- Requires-Python: <3.13,>=3.9
30
- Description-Content-Type: text/x-rst
31
- Requires-Dist: cysignals >=1.10.2
32
-
33
- ==========================================================================================
34
- passagemath: Homfly polynomials of knots/links with libhomfly
35
- ==========================================================================================
36
-
37
- About SageMath
38
- --------------
39
-
40
- "Creating a Viable Open Source Alternative to
41
- Magma, Maple, Mathematica, and MATLAB"
42
-
43
- Copyright (C) 2005-2024 The Sage Development Team
44
-
45
- https://www.sagemath.org
46
-
47
- SageMath fully supports all major Linux distributions, recent versions of
48
- macOS, and Windows (Windows Subsystem for Linux).
49
-
50
- See https://doc.sagemath.org/html/en/installation/index.html
51
- for general installation instructions.
52
-
53
-
54
- About this pip-installable source distribution
55
- ----------------------------------------------
56
-
57
- This pip-installable source distribution ``sagemath-homfly`` is a small
58
- optional distribution for use with ``sagemath-standard``.
59
-
60
- It provides a Cython interface to the ``libhomfly`` library.
@@ -1,9 +0,0 @@
1
- passagemath_homfly-10.4.47.dist-info/RECORD,,
2
- passagemath_homfly-10.4.47.dist-info/WHEEL,sha256=jy1z_Yt9Eu2Sq-U3xqyJepmiuhHoM1cERGbylgFICpo,110
3
- passagemath_homfly-10.4.47.dist-info/top_level.txt,sha256=hibFyzQHiLOMK68qL1OWsNKaXOmSXqZjeLTBem6Yy7I,5
4
- passagemath_homfly-10.4.47.dist-info/METADATA,sha256=KECN4tKdSzXNUFteVBGPEX82y0S8vqxP-68ciO8oiyI,2601
5
- passagemath_homfly.dylibs/libgc.1.dylib,sha256=3L3PQAbM84DFIm05NZP3rY0DuEkIVHuAw0NdRZR6ciA,298608
6
- passagemath_homfly.dylibs/libhomfly.0.dylib,sha256=nwmAW1KUZG1x7ukC5eTsVLrcBHjhICjx1OqIqIIaYL8,73792
7
- sage/all__sagemath_homfly.py,sha256=acUGFX0Wx4P0uJwgj5m9ANtfRaZriA7rgY4-VlJE8xc,45
8
- sage/libs/all__sagemath_homfly.py,sha256=acUGFX0Wx4P0uJwgj5m9ANtfRaZriA7rgY4-VlJE8xc,45
9
- sage/libs/homfly.cpython-312-darwin.so,sha256=xMUYDzdMKeeDwuWfT4Bpb98zdAnS74N2fB4JtnQv8Xs,96432
@@ -1 +0,0 @@
1
- sage
Binary file
Binary file