khoca 0.4.dev7__tar.gz → 0.5__tar.gz
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.
- khoca-0.5/.gitignore +11 -0
- {khoca-0.4.dev7 → khoca-0.5}/COPYING +0 -0
- khoca-0.5/PKG-INFO +210 -0
- khoca-0.5/pyproject.toml +46 -0
- khoca-0.4.dev7/.github/workflows/push_docker.yml +0 -20
- khoca-0.4.dev7/.github/workflows/run_tests.yml +0 -37
- khoca-0.4.dev7/.github/workflows/upload_pypi.yml +0 -15
- khoca-0.4.dev7/Dockerfile +0 -27
- khoca-0.4.dev7/INSTALL +0 -36
- khoca-0.4.dev7/MANIFEST.in +0 -1
- khoca-0.4.dev7/Makefile +0 -83
- khoca-0.4.dev7/PKG-INFO +0 -218
- khoca-0.4.dev7/__init__.py +0 -316
- khoca-0.4.dev7/bin/BraidToMyPD.py +0 -51
- khoca-0.4.dev7/bin/KrasnerGaussToMyPD.py +0 -43
- khoca-0.4.dev7/bin/KrasnerGaussToMyPDLib.py +0 -122
- khoca-0.4.dev7/bin/__init__.py +0 -0
- khoca-0.4.dev7/bin/pd_to_mypd.py +0 -36
- khoca-0.4.dev7/bin/pd_to_mypdLib.py +0 -30
- khoca-0.4.dev7/bin/pseudoBraidToKrasnerGauss.py +0 -41
- khoca-0.4.dev7/bin/pseudoBraidToKrasnerGaussLib.py +0 -46
- khoca-0.4.dev7/converters/binToHuman.py +0 -116
- khoca-0.4.dev7/converters/humanToBin.py +0 -131
- khoca-0.4.dev7/converters/montesinos.py +0 -143
- khoca-0.4.dev7/data/KhovanovMinus +0 -11
- khoca-0.4.dev7/data/KhovanovMinus.bin +0 -0
- khoca-0.4.dev7/data/KhovanovPlus +0 -11
- khoca-0.4.dev7/data/KhovanovPlus.bin +0 -0
- khoca-0.4.dev7/data/KrasnerMinus +0 -20
- khoca-0.4.dev7/data/KrasnerMinus.bin +0 -0
- khoca-0.4.dev7/data/KrasnerPlus +0 -20
- khoca-0.4.dev7/data/KrasnerPlus.bin +0 -0
- khoca-0.4.dev7/docker/entrypoint.sh +0 -4
- khoca-0.4.dev7/khoca.egg-info/PKG-INFO +0 -218
- khoca-0.4.dev7/khoca.egg-info/SOURCES.txt +0 -62
- khoca-0.4.dev7/khoca.egg-info/dependency_links.txt +0 -1
- khoca-0.4.dev7/khoca.egg-info/not-zip-safe +0 -1
- khoca-0.4.dev7/khoca.egg-info/top_level.txt +0 -6
- khoca-0.4.dev7/khoca.py +0 -432
- khoca-0.4.dev7/pyproject.toml +0 -8
- khoca-0.4.dev7/setup.cfg +0 -7
- khoca-0.4.dev7/setup.py +0 -125
- khoca-0.4.dev7/src/compilerFlagsInfo.cpp +0 -1
- khoca-0.4.dev7/src/krasner/krasner.cpp +0 -821
- khoca-0.4.dev7/src/krasner/krasner.h +0 -492
- khoca-0.4.dev7/src/krasner/krasnerExplicitTemplates.cpp +0 -72
- khoca-0.4.dev7/src/planar_algebra/coefficient_rings.cpp +0 -457
- khoca-0.4.dev7/src/planar_algebra/coefficient_rings.h +0 -303
- khoca-0.4.dev7/src/planar_algebra/coefficient_rings_explicitTemplates.cpp +0 -38
- khoca-0.4.dev7/src/planar_algebra/explicitTemplates.cpp +0 -87
- khoca-0.4.dev7/src/planar_algebra/planar_algebra.cpp +0 -1159
- khoca-0.4.dev7/src/planar_algebra/planar_algebra.h +0 -729
- khoca-0.4.dev7/src/planar_algebra/smith.cpp +0 -217
- khoca-0.4.dev7/src/planar_algebra/smith.h +0 -22
- khoca-0.4.dev7/src/planar_algebra/sparsemat.cpp +0 -715
- khoca-0.4.dev7/src/planar_algebra/sparsemat.h +0 -288
- khoca-0.4.dev7/src/planar_algebra/sparsematExplicitTemplates.cpp +0 -125
- khoca-0.4.dev7/src/python_interface/pui.cpp +0 -12579
- khoca-0.4.dev7/src/python_interface/pui.pyx +0 -266
- khoca-0.4.dev7/src/python_interface/pythonInterface.cpp +0 -470
- khoca-0.4.dev7/src/python_interface/pythonInterface.h +0 -71
- khoca-0.4.dev7/src/shared.cpp +0 -71
- khoca-0.4.dev7/src/shared.h +0 -95
- {khoca-0.4.dev7 → khoca-0.5}/README.md +0 -0
khoca-0.5/.gitignore
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
bin/__pycache__/
|
|
2
|
+
bin/pui.so
|
|
3
|
+
src/krasner/krasner.o
|
|
4
|
+
src/planar_algebra/coefficient_rings.o
|
|
5
|
+
src/planar_algebra/planar_algebra.o
|
|
6
|
+
src/planar_algebra/smith.o
|
|
7
|
+
src/planar_algebra/sparsemat.o
|
|
8
|
+
src/python_interface/pui.cpp
|
|
9
|
+
src/python_interface/pui.o
|
|
10
|
+
src/python_interface/pythonInterface.o
|
|
11
|
+
src/shared.o
|
|
File without changes
|
khoca-0.5/PKG-INFO
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: khoca
|
|
3
|
+
Version: 0.5
|
|
4
|
+
Summary: Khoca as pip installable package
|
|
5
|
+
Project-URL: Homepage, https://github.com/soehms/khoca/
|
|
6
|
+
Author-email: Sebastian Oehms <seb.oehms@gmail.com>
|
|
7
|
+
License-Expression: GPL-2.0-or-later
|
|
8
|
+
License-File: COPYING
|
|
9
|
+
Keywords: Khovanov,Knot,homology,theory
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: C++
|
|
15
|
+
Classifier: Programming Language :: Cython
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# README for Khoca, a knot homology calculator
|
|
21
|
+
|
|
22
|
+
The same text as in this README file is available (with illustrations) at
|
|
23
|
+
http://lewark.de/lukas/khoca.html
|
|
24
|
+
|
|
25
|
+
Khoca is computer program to calculate sl(N)-homology of knots. The program has
|
|
26
|
+
been written for joint projects with Andrew Lobb such as [3, 4]. The paper [3]
|
|
27
|
+
also contains a description of the algorithm used by khoca. The main innovation
|
|
28
|
+
is to use Krasner's calculation of the sl(N)-homology of the basic two-crossing
|
|
29
|
+
tangle [2] for calculations of the homology of bipartite knots.
|
|
30
|
+
|
|
31
|
+
Khoca calculates the following:
|
|
32
|
+
|
|
33
|
+
* Khovanov sl(2)-homology of arbitrary links, given as a braid or in PD code.
|
|
34
|
+
* Khovanov-Rozansky sl(N)-homology with N > 2 of bipartite knots, given by a
|
|
35
|
+
certain encoding of a matched diagram of the knot (see [3] and section
|
|
36
|
+
"Encoding of matched diagrams" below).
|
|
37
|
+
* Homology over the integers, the rationals or a prime field.
|
|
38
|
+
* Either equivariant homology, or homology with an arbitrary fixed potential.
|
|
39
|
+
* All pages of the spectral sequence of filtered homology over a field.
|
|
40
|
+
* Reduced and unreduced homology.
|
|
41
|
+
* Homology of sums and mirror images of knots.
|
|
42
|
+
|
|
43
|
+
You are encouraged to contact me with any kind of questions or comments
|
|
44
|
+
regarding khoca. If you are using khoca for a project or publication, please
|
|
45
|
+
cite this web page, or the paper [3].
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
Binaries for Linux are available for download from
|
|
50
|
+
http://lewark.de/lukas/khoca.html
|
|
51
|
+
They should run on any Linux installation that has python3.6. Binaries for
|
|
52
|
+
Windows or Mac are not available at the moment.
|
|
53
|
+
|
|
54
|
+
The source code, including instructions on how to compile it, is available at
|
|
55
|
+
the GitHub repository khoca:
|
|
56
|
+
https://github.com/LLewark/khoca
|
|
57
|
+
|
|
58
|
+
To run Khoca in Docker type:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
docker run -it soehms/khoca:latest
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Its download size is 162 MB and it will need 516 MB of disk space on your
|
|
65
|
+
device. To create a new (resp. locally own) Docker image cd to the khoca
|
|
66
|
+
directory type
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
docker build -f Dockerfile --tag khoca:<your_tag> .
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If your machine has an older CPU it can happen that you get *Illegal Instruction*
|
|
73
|
+
errors. In that case you better should use the image `soehms/khoca:old_cpu`.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
To use the program, run khoca.py (a python3 script) from the command line.
|
|
79
|
+
khoca.py takes three arguments:
|
|
80
|
+
|
|
81
|
+
1. The coefficient ring; `0` for integers, `1` for rationals, a prime `p` for the
|
|
82
|
+
corresponding finite field.
|
|
83
|
+
|
|
84
|
+
2. A sequence of N integers `a_0, ..., a_{N-1}` separated by a non-digit
|
|
85
|
+
character, defining the Frobenius algebra `F[X]/(X^N + a_{N-1}X^{N-1} + ... +
|
|
86
|
+
a_0)`. Alternatively, `e` followed by a number `N` for equivariant computation
|
|
87
|
+
over `sl(N)`. For example, `-1.0.0` gives the Frobenius algebra `F[X]/(X3 - 1)`.
|
|
88
|
+
|
|
89
|
+
3. A root of the polynomial given in 2. for the calculation of reduced homology
|
|
90
|
+
(for the dependence of reduced homology on a root, see [3]). For example, to
|
|
91
|
+
get the standard graded reduced homology, use 0 as root. If you are not
|
|
92
|
+
interested in reduced homology, it does not matter what root you chose (and
|
|
93
|
+
khoca does not check that the number is actually a root).
|
|
94
|
+
|
|
95
|
+
The option `-p` will show progress bars, `-v` will give more verbose
|
|
96
|
+
non-mathematical information, and `-h` will print a short help text. Each
|
|
97
|
+
argument after the first three arguments, can be one of the following.
|
|
98
|
+
|
|
99
|
+
1. `BraidX` calculates homology of a link given as closure of the braid `X`,
|
|
100
|
+
formatted as in knotscape (`a` = first Artin generator, `A` = its inverse, `b` =
|
|
101
|
+
second Artin generator, etc.). This works only for `sl(2)` homology, otherwise
|
|
102
|
+
output is nonsensical.
|
|
103
|
+
|
|
104
|
+
2. `PdX` calculates homology of a link given in PD notation (as e.g. given on
|
|
105
|
+
KnotInfo). Again, this works only for `sl(2)` homology, otherwise output is
|
|
106
|
+
nonsensical.
|
|
107
|
+
|
|
108
|
+
3. `GaussX` calculates homology of a bipartite knot given as a matched diagram,
|
|
109
|
+
following the convention explained in the section below. This works for `sl(N)`
|
|
110
|
+
homology for all `N`.
|
|
111
|
+
|
|
112
|
+
4. `MirrorX` takes the dual of the result at spot `X`.
|
|
113
|
+
|
|
114
|
+
5. `SumXY` computes the homology of the connected sum of the results saved at
|
|
115
|
+
spots `X` and `Y` (numbers separated by a non-digit character).
|
|
116
|
+
|
|
117
|
+
6. `CalcX` outputs the result saved at spot `X`. If you forget this command, the
|
|
118
|
+
program will have no output.
|
|
119
|
+
|
|
120
|
+
The program keeps a stack of computed homologies, enumerated 0,1,2... . Each of
|
|
121
|
+
the commands 1 - 5 puts a new homology on that stack, whereas the command 6.
|
|
122
|
+
prints the homology at a certain spot. This is mainly useful to compute
|
|
123
|
+
homology of sums of knots.
|
|
124
|
+
|
|
125
|
+
Here are some examples:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
./khoca.py 0 0.0 0 braidaBaB calc0
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
calculates the classical `sl(2)` Khovanov homology (both reduced and unreduced)
|
|
132
|
+
of the closure of the braid `aBaB` (knotscape notation), i.e. the figure-eight
|
|
133
|
+
knot.
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
./khoca.py 0 e2 0 pd[[4,2,5,1],[8,6,1,5],[6,3,7,4],[2,7,3,8]] calc0
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
calculates integral equivariant `sl(2)` homology of the figure-eight knot.
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
./khoca.py 7 0.-1 0 braidabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef
|
|
145
|
+
calc0 -p
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
calculates Khovanov homology of the `(7,8)`-torus knot over `F7` with perturbed
|
|
149
|
+
potential, displaying progress bars. This calculation takes roughly two
|
|
150
|
+
minutes, and shows that the spectral sequence does not collapse on the second
|
|
151
|
+
page, refuting the knight-move conjecture over finite fields (cf. [1]).
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
./converters/montesinos.py [1/5,1/3,-1/2]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
outputs `[12,4,16,10,15,9,14,13]`, the code for a matched diagram of the
|
|
159
|
+
`(5,3,-2)`-pretzel knot, aka the `(3,5)`-torus knot, aka `10_{124}`. So
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
./khoca.py 1 1.0.0.0.0 0 gauss[12,4,16,10,15,9,14,13] calc0 calculates
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
rational `sl(5)` homology and the corresponding Rasmussen invariant of the `(3,5)`
|
|
166
|
+
torus knot.
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
./khoca.py 1 1.0 0 braidaaa dual0 sum0+1 braidaBaB sum2+3 calc4
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
calculates `sl(2)` homology of the sum of the trefoil, its mirror image and a figure-8-knot.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
# Encoding of matched diagrams
|
|
177
|
+
|
|
178
|
+
This section describes how to encode a matched knot diagram, i.e. a diagram
|
|
179
|
+
that consists of `n` copies of the basic 2-crossing tangle. Resolving each basic
|
|
180
|
+
tangle into two intervals and a chord results in a single circle with n
|
|
181
|
+
non-intersecting (red) chords, which may be on either side of the circle.
|
|
182
|
+
Enumerate the `2n` chord endpoints by walking around the circle. If a chord
|
|
183
|
+
connects the points `i` and `j`, let `f(i) = j`. Write down the list `f(1), f(2), ...,
|
|
184
|
+
f(2n)` omitting `f(i)` if `f(i) < i`. Moreover, make the list entries signed, and
|
|
185
|
+
let the sign reflect the sign of the two crossings of the corresponding
|
|
186
|
+
2-crossing tangle. This list of `n` non-zero integers uniquely determines the
|
|
187
|
+
matched diagram. As an example, the standard diagram of `6_1` is matched and
|
|
188
|
+
encoded as `[-4,6,5]`.
|
|
189
|
+
|
|
190
|
+
"Half" of Montesinos knots are bipartite [3]. You may use the python3 script
|
|
191
|
+
`./converters/montesinos.py` to obtain the encoding of a matched diagram of
|
|
192
|
+
Montesinos knots.
|
|
193
|
+
|
|
194
|
+
# References
|
|
195
|
+
|
|
196
|
+
[1] Bar-Natan: Fast Khovanov Homology Computations, Journal of Knot Theory and
|
|
197
|
+
its Ramifications 16 (2007), no.3, pp. 243-255, arXiv:math/0606318, MR2320156.
|
|
198
|
+
|
|
199
|
+
[2] Daniel Krasner: A computation in Khovanov-Rozansky Homology, Fundamenta
|
|
200
|
+
Mathematicae 203 (2009), pp. 75-95, arXiv:0801.4018, MR2491784.
|
|
201
|
+
|
|
202
|
+
[3] Lukas Lewark and Andrew Lobb: New Quantum Obstructions to Sliceness,
|
|
203
|
+
Proceedings of the London Mathematical Society 112 (2016), no. 1, pp. 81-114,
|
|
204
|
+
arXiv:1501.07138, MR3458146.
|
|
205
|
+
|
|
206
|
+
[4] Lukas Lewark and Andrew Lobb: Upsilon-like concordance invariants from
|
|
207
|
+
sl(n) knot cohomology, arXiv:1707.00891.
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
Lukas Lewark, 2018
|
khoca-0.5/pyproject.toml
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling",
|
|
3
|
+
"hatch-vcs"]
|
|
4
|
+
build-backend = "hatchling.build"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "khoca"
|
|
8
|
+
dynamic = ["version"]
|
|
9
|
+
description = "Khoca as pip installable package"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = "GPL-2.0-or-later"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Sebastian Oehms", email = "seb.oehms@gmail.com" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"Khovanov",
|
|
17
|
+
"Knot",
|
|
18
|
+
"homology",
|
|
19
|
+
"theory",
|
|
20
|
+
]
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Development Status :: 3 - Alpha",
|
|
23
|
+
"Intended Audience :: Science/Research",
|
|
24
|
+
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
|
|
25
|
+
"Operating System :: POSIX :: Linux",
|
|
26
|
+
"Programming Language :: C++",
|
|
27
|
+
"Programming Language :: Cython",
|
|
28
|
+
"Programming Language :: Python",
|
|
29
|
+
"Topic :: Scientific/Engineering :: Mathematics",
|
|
30
|
+
]
|
|
31
|
+
dependencies = []
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/soehms/khoca/"
|
|
35
|
+
|
|
36
|
+
[tool.hatch.version]
|
|
37
|
+
source = "vcs"
|
|
38
|
+
|
|
39
|
+
#[tool.hatch.build.hooks.vcs]
|
|
40
|
+
#version-file = "khoca/_version.py"
|
|
41
|
+
|
|
42
|
+
[tool.hatch.build.targets.sdist]
|
|
43
|
+
include = [
|
|
44
|
+
"/khoca",
|
|
45
|
+
]
|
|
46
|
+
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
name: Publish Docker
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
create:
|
|
5
|
-
tag:
|
|
6
|
-
- '*'
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@master
|
|
14
|
-
- name: Publish to Registry
|
|
15
|
-
uses: elgohr/Publish-Docker-Github-Action@master
|
|
16
|
-
with:
|
|
17
|
-
name: soehms/khoca
|
|
18
|
-
username: ${{ secrets.DOCKER_USER }}
|
|
19
|
-
password: ${{ secrets.DOCKER_API_TOKEN }}
|
|
20
|
-
tag_names: true
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# This workflow runs tests to build Khoca on verois systems
|
|
2
|
-
|
|
3
|
-
name: Run Tests
|
|
4
|
-
|
|
5
|
-
# Triggers the workflow on push or pull request events and manually
|
|
6
|
-
on: [push, pull_request, workflow_dispatch]
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
# This workflow contains one job called build
|
|
10
|
-
build:
|
|
11
|
-
name: Build Khoca
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
# Checks-out the repository under $GITHUB_WORKSPACE, so our job can access it
|
|
16
|
-
- name: Checkout code
|
|
17
|
-
id: checkout_code
|
|
18
|
-
uses: actions/checkout@v2
|
|
19
|
-
|
|
20
|
-
# Installs dependencies
|
|
21
|
-
- name: Install Dependencies
|
|
22
|
-
id: dependencies
|
|
23
|
-
run: |
|
|
24
|
-
sudo apt-get update -y
|
|
25
|
-
sudo apt-get install -y make g++ python3 python3-pip libgmp-dev pari-gp2c
|
|
26
|
-
pip3 install cython
|
|
27
|
-
|
|
28
|
-
# Building Khoca
|
|
29
|
-
- name: Make
|
|
30
|
-
id: make
|
|
31
|
-
run: make
|
|
32
|
-
|
|
33
|
-
# Run a Test (should result to 1)
|
|
34
|
-
- name: Run Test
|
|
35
|
-
id: run_test
|
|
36
|
-
run: |
|
|
37
|
-
./khoca.py 0 0.0 0 braidaBaB calc0 | grep -c "t^-2q^4 + t^-1q^2 + t^0q^0 + t^1q^-2 + t^2q^-4"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
name: PyPI Deployer
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
tags:
|
|
5
|
-
- "*" # Push events of new tags
|
|
6
|
-
jobs:
|
|
7
|
-
Linux-build:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
env:
|
|
10
|
-
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
|
|
11
|
-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v2
|
|
14
|
-
- name: build and upload manylinux wheels
|
|
15
|
-
uses: Niraj-Kamdar/manylinux-wheel-builder@master
|
khoca-0.4.dev7/Dockerfile
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
################################################################################
|
|
2
|
-
# HOWTO use this file for local builds #
|
|
3
|
-
################################################################################
|
|
4
|
-
# To build Khoca, run this command from your khoca/ directory: #
|
|
5
|
-
# $ docker build -f Dockerfile --tag khoca:<your_tag> . #
|
|
6
|
-
# To run Khoca: #
|
|
7
|
-
# $ docker run -it khoca:<your_tag> #
|
|
8
|
-
################################################################################
|
|
9
|
-
FROM ubuntu:latest
|
|
10
|
-
LABEL maintainer="Sebastian Oehms <seb.oehms@gmail.com>"
|
|
11
|
-
# Set sane defaults for common environment variables.
|
|
12
|
-
ENV LC_ALL C.UTF-8
|
|
13
|
-
ENV LANG C.UTF-8
|
|
14
|
-
ENV SHELL /bin/bash
|
|
15
|
-
# install prerequisites
|
|
16
|
-
RUN apt-get -qq update \
|
|
17
|
-
&& apt-get -qq install -y --no-install-recommends git g++ make libgmp-dev pari-gp2c python3 python3-dev python3-pip \
|
|
18
|
-
&& apt-get -qq clean \
|
|
19
|
-
&& rm -r /var/lib/apt/lists/* \
|
|
20
|
-
&& pip install cython \
|
|
21
|
-
&& git clone https://github.com/soehms/khoca.git \
|
|
22
|
-
&& cd khoca/ \
|
|
23
|
-
&& make
|
|
24
|
-
WORKDIR "/khoca/"
|
|
25
|
-
COPY ./docker/entrypoint.sh /usr/local/bin/khoca-entrypoint
|
|
26
|
-
ENTRYPOINT ["/usr/local/bin/khoca-entrypoint"]
|
|
27
|
-
CMD ["bash"]
|
khoca-0.4.dev7/INSTALL
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
If you downloaded binaries, the only slightly exotic library that needs to be
|
|
2
|
-
present on your system is libpython3.6m.so.1.0.
|
|
3
|
-
|
|
4
|
-
This file gives some instructions on how to compile khoca from source. You are
|
|
5
|
-
welcome to email me at <lukas@lewark.de> for help.
|
|
6
|
-
You will need:
|
|
7
|
-
* a version of gcc that supports c++11.
|
|
8
|
-
* cython.
|
|
9
|
-
* mpir, compiled with c++ support.
|
|
10
|
-
* gp/pari.
|
|
11
|
-
* python3
|
|
12
|
-
|
|
13
|
-
If your python version is not 3.6, change the variable PYTHONVERSION in the
|
|
14
|
-
make file accordingly. If you installed the above-mentioned libraries to a
|
|
15
|
-
non-standard location, you might need to add an -I parameter to GENERALCFLAGS,
|
|
16
|
-
or an -L parameter to STATIC_DIRECTIVE. Then, run make. This should produce the
|
|
17
|
-
file bin/pui.so. Compilation may take quite a while. If you encounter problems,
|
|
18
|
-
you may wish to uncomment the two lines after "Fast compile" in the Makefile,
|
|
19
|
-
and comment out the two lines after "Not Debugging". Also, you can delete lines
|
|
20
|
-
81 - 93 in src/shared.h. These measures will lead to faster compilation.
|
|
21
|
-
|
|
22
|
-
Now you are set! Run
|
|
23
|
-
|
|
24
|
-
./khoca.py 0 0.0 0 braidaaa calc0
|
|
25
|
-
|
|
26
|
-
to test. The output should be:
|
|
27
|
-
|
|
28
|
-
Frobenius algebra: Z[X] / (1*X^2).
|
|
29
|
-
Result:
|
|
30
|
-
Reduced Homology:
|
|
31
|
-
Non-equivariant homology:
|
|
32
|
-
t^-3q^8 + t^-2q^6 + t^0q^2
|
|
33
|
-
Unreduced Homology:
|
|
34
|
-
Non-equivariant homology:
|
|
35
|
-
t^-3q^9 + t^-2q^5 + t^0q^1 + t^0q^3 + t^-2q^7[2]
|
|
36
|
-
|
khoca-0.4.dev7/MANIFEST.in
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
include data/
|
khoca-0.4.dev7/Makefile
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
CC=g++
|
|
2
|
-
PYTHONVERSION=3.8
|
|
3
|
-
GENERALCFLAGS=-c -std=c++11 -I/usr/include/python$(PYTHONVERSION) -D__STDC_LIMIT_MACROS -Wall -Wextra -march=native
|
|
4
|
-
|
|
5
|
-
STATIC_DIRECTIVE=-lpython$(PYTHONVERSION) -lgmpxx -lgmp -L/usr/local/lib -lpari
|
|
6
|
-
# To compile a version of the library that contains static copies of mpir and pari, set variable STATIC to 1.
|
|
7
|
-
ifeq ($(STATIC),1)
|
|
8
|
-
STATIC_DIRECTIVE=-Wl,--no-as-needed -ldl -lutil -static-libgcc -lpython$(PYTHONVERSION) -L/usr/local/lib /usr/local/lib/libmpirxx.a /usr/local/lib/libmpir.a /usr/local/lib/libpari.a
|
|
9
|
-
endif
|
|
10
|
-
|
|
11
|
-
CFLAGSPYXO=-Wno-write-strings -Wimplicit-fallthrough=0 -fno-strict-aliasing -fwrapv -pthread
|
|
12
|
-
SHAREDCFLAGS=-shared -fPIC
|
|
13
|
-
|
|
14
|
-
# HOW TO DEBUG:
|
|
15
|
-
# Turn on Debugging here in Makefile; change the switches in shared.h (and maybe compile only with one bitsize for speed); and turn on debugging-bool-constant in khoroho.py.
|
|
16
|
-
# If multithreading is not disabled, there will be plenty of errors, because sanity checks are done while other threads are active.
|
|
17
|
-
|
|
18
|
-
# FAST COMPILE
|
|
19
|
-
# CFLAGS=$(GENERALCFLAGS) $(SHAREDCFLAGS) -O0 -ggdb -g3 -fopenmp
|
|
20
|
-
# COMPILERFLAGSINFO=\"Fast compilation\"
|
|
21
|
-
|
|
22
|
-
# DEBUGGING
|
|
23
|
-
# CFLAGS=$(GENERALCFLAGS) $(SHAREDCFLAGS) -Og -ggdb -g3 -fopenmp
|
|
24
|
-
# COMPILERFLAGSINFO=\"Debug\"
|
|
25
|
-
|
|
26
|
-
# FAST, BUT DEBUG INFO
|
|
27
|
-
# CFLAGS=$(GENERALCFLAGS) $(SHAREDCFLAGS) -O3 -g3 -fopenmp
|
|
28
|
-
# COMPILERFLAGSINFO=\"Fast program, but including debug info\"
|
|
29
|
-
|
|
30
|
-
# NOT DEBUGGING
|
|
31
|
-
CFLAGS=$(GENERALCFLAGS) $(SHAREDCFLAGS) -O3 -fopenmp
|
|
32
|
-
COMPILERFLAGSINFO=\"Release\"
|
|
33
|
-
|
|
34
|
-
CMPIRFLAGS=-I/usr/local/include
|
|
35
|
-
LDFLAGS=$(STATIC_DIRECTIVE) $(SHAREDCFLAGS) -z defs -lpthread -lstdc++ -Wl,-t
|
|
36
|
-
|
|
37
|
-
PYX=src/python_interface/pui.pyx
|
|
38
|
-
PYXCPP=src/python_interface/pui.cpp
|
|
39
|
-
PYXO=src/python_interface/pui.o
|
|
40
|
-
PYI=src/python_interface/pythonInterface.cpp
|
|
41
|
-
PYIO=src/python_interface/pythonInterface.o
|
|
42
|
-
SOURCES=src/planar_algebra/planar_algebra.cpp src/shared.cpp src/krasner/krasner.cpp src/planar_algebra/sparsemat.cpp src/planar_algebra/coefficient_rings.cpp src/planar_algebra/smith.cpp src/planar_algebra/coefficient_rings_explicitTemplates.cpp
|
|
43
|
-
OBJECTS=src/planar_algebra/planar_algebra.o src/shared.o src/krasner/krasner.o src/planar_algebra/sparsemat.o src/planar_algebra/coefficient_rings.o src/planar_algebra/smith.o
|
|
44
|
-
EXECUTABLE=bin/pui.so
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.PHONY : clean
|
|
48
|
-
|
|
49
|
-
all: $(EXECUTABLE)
|
|
50
|
-
|
|
51
|
-
$(EXECUTABLE): $(SOURCES) $(OBJECTS) $(PYX) $(PYXCPP) $(PYXO) $(PYI) $(PYIO) Makefile
|
|
52
|
-
$(CC) $(OBJECTS) $(PYIO) $(PYXO) -o $@ $(LDFLAGS)
|
|
53
|
-
|
|
54
|
-
$(PYXCPP): $(PYX) Makefile
|
|
55
|
-
cython -3 --cplus $(PYX)
|
|
56
|
-
|
|
57
|
-
$(PYXO): $(PYXCPP) src/python_interface/pythonInterface.h src/shared.h Makefile
|
|
58
|
-
$(CC) $(CFLAGS) $(CFLAGSPYXO) $< -o $@
|
|
59
|
-
|
|
60
|
-
src/python_interface/pythonInterface.o: src/python_interface/pythonInterface.cpp src/planar_algebra/planar_algebra.h src/krasner/krasner.h src/shared.h src/planar_algebra/sparsemat.h src/planar_algebra/coefficient_rings.h Makefile
|
|
61
|
-
echo "#define COMPILERFLAGSINFO $(COMPILERFLAGSINFO)" > src/compilerFlagsInfo.cpp
|
|
62
|
-
$(CC) $(CMPIRFLAGS) $(CFLAGS) $< -o $@
|
|
63
|
-
|
|
64
|
-
src/planar_algebra/planar_algebra.o: src/planar_algebra/planar_algebra.cpp src/planar_algebra/planar_algebra.h src/shared.h src/planar_algebra/explicitTemplates.cpp src/planar_algebra/sparsemat.h src/planar_algebra/coefficient_rings.h src/krasner/krasner.h Makefile
|
|
65
|
-
$(CC) $(CMPIRFLAGS) $(CFLAGS) $< -o $@
|
|
66
|
-
|
|
67
|
-
src/shared.o: src/shared.cpp src/shared.h Makefile
|
|
68
|
-
$(CC) $(CFLAGS) $< -o $@
|
|
69
|
-
|
|
70
|
-
src/krasner/krasner.o: src/krasner/krasner.cpp src/krasner/krasner.h src/krasner/krasnerExplicitTemplates.cpp src/planar_algebra/planar_algebra.h src/shared.h src/planar_algebra/sparsemat.h src/planar_algebra/coefficient_rings.h Makefile
|
|
71
|
-
$(CC) $(CMPIRFLAGS) $(CFLAGS) $< -o $@
|
|
72
|
-
|
|
73
|
-
src/planar_algebra/sparsemat.o: src/planar_algebra/sparsemat.cpp src/planar_algebra/planar_algebra.h src/krasner/krasner.h src/shared.h src/planar_algebra/sparsemat.h src/planar_algebra/sparsematExplicitTemplates.cpp src/planar_algebra/coefficient_rings.h Makefile
|
|
74
|
-
$(CC) $(CMPIRFLAGS) $(CFLAGS) $< -o $@
|
|
75
|
-
|
|
76
|
-
src/planar_algebra/coefficient_rings.o: src/planar_algebra/coefficient_rings.cpp src/planar_algebra/coefficient_rings.h src/shared.h src/planar_algebra/coefficient_rings_explicitTemplates.cpp Makefile
|
|
77
|
-
$(CC) $(CMPIRFLAGS) $(CFLAGS) $< -o $@
|
|
78
|
-
|
|
79
|
-
src/planar_algebra/smith.o: src/planar_algebra/smith.cpp src/planar_algebra/planar_algebra.h src/shared.h src/planar_algebra/explicitTemplates.cpp src/planar_algebra/sparsemat.h src/planar_algebra/coefficient_rings.h Makefile
|
|
80
|
-
$(CC) $(CMPIRFLAGS) $(CFLAGS) $< -o $@
|
|
81
|
-
|
|
82
|
-
clean:
|
|
83
|
-
rm -f $(OBJECTS) $(PYIO) $(PYXO) $(TESTER) $(EXECUTABLE) $(PYXCPP)
|