pyflagsercount 0.2.0__cp39-cp39-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.
Binary file
@@ -0,0 +1,3 @@
1
+ """Implementation of the python API for the cell count of the flagser C++ library."""
2
+
3
+ from .flagser_functions import *
@@ -0,0 +1,55 @@
1
+
2
+ import numpy as np
3
+ from pycount import run_flagser_count
4
+
5
+ def flagser_count(adjacency_matrix,max_simplices=False,containment=False,
6
+ return_simplices=False, print='',threads=8,transpose=False,out='',binary='',max_dim=-1,
7
+ vertices_todo='',max_dim_print=-1,min_dim_print=-1, compressed=False, est_max_dim=-1,
8
+ edge_containment=False):
9
+
10
+ return run_flagser_count(adjacency_matrix.shape[0], np.transpose(np.array(np.nonzero(adjacency_matrix))),
11
+ max_simplices,containment,return_simplices,(len(print)>0),print,
12
+ str(threads),transpose,(len(out)>0),out,(len(binary)>0),binary,
13
+ (max_dim!=-1),str(max_dim),(len(vertices_todo)>0),vertices_todo,
14
+ (max_dim_print!=-1),str(max_dim_print),(min_dim_print!=-1),str(min_dim_print),
15
+ False, False,'', '', np.array([]),np.array([]),(est_max_dim!=-1),str(est_max_dim),
16
+ edge_containment)
17
+
18
+ def flagser_count_edges(num_vertices, edge_list, max_simplices=False,containment=False,
19
+ return_simplices=False, print='',threads=8,transpose=False,out='',binary='',max_dim=-1,
20
+ vertices_todo='',max_dim_print=-1,min_dim_print=-1, compressed=False, est_max_dim=-1,
21
+ edge_containment=False):
22
+
23
+ return run_flagser_count(num_vertices, edge_list,
24
+ max_simplices,containment,return_simplices,(len(print)>0),print,
25
+ str(threads),transpose,(len(out)>0),out,(len(binary)>0),binary,
26
+ (max_dim!=-1),str(max_dim),(len(vertices_todo)>0),vertices_todo,
27
+ (max_dim_print!=-1),str(max_dim_print),(min_dim_print!=-1),str(min_dim_print),
28
+ False, False,'', '', np.array([]),np.array([]),(est_max_dim!=-1),str(est_max_dim),
29
+ edge_containment)
30
+
31
+ def flagser_count_csr(num_vertices, indices_address, indptr_address,max_simplices=False,containment=False,
32
+ return_simplices=False, print='',threads=8,transpose=False,out='',binary='',max_dim=-1,
33
+ vertices_todo='',max_dim_print=-1,min_dim_print=-1, est_max_dim=-1):
34
+
35
+ return run_flagser_count(num_vertices, np.array([]),
36
+ max_simplices,containment,return_simplices,(len(print)>0),print,
37
+ str(threads),transpose,(len(out)>0),out,(len(binary)>0),binary,
38
+ (max_dim!=-1),str(max_dim),(len(vertices_todo)>0),vertices_todo,
39
+ (max_dim_print!=-1),str(max_dim_print),(min_dim_print!=-1),str(min_dim_print),
40
+ True, False, indices_address, indptr_address, np.array([]), np.array([]),
41
+ (est_max_dim!=-1),str(est_max_dim),False)
42
+
43
+ def flagser_count_csr_npy(num_vertices, indices, indptr, max_simplices=False,containment=False,
44
+ return_simplices=False, print='',threads=8,transpose=False,out='',binary='',max_dim=-1,
45
+ vertices_todo='',max_dim_print=-1,min_dim_print=-1, est_max_dim=-1):
46
+
47
+ assert str(indices.dtype)[-2:] == '32' and str(indptr.dtype)[-2:] == '32', "Indices and indptr must be 32 bits"
48
+
49
+ return run_flagser_count(num_vertices, np.array([]),
50
+ max_simplices,containment,return_simplices,(len(print)>0),print,
51
+ str(threads),transpose,(len(out)>0),out,(len(binary)>0),binary,
52
+ (max_dim!=-1),str(max_dim),(len(vertices_todo)>0),vertices_todo,
53
+ (max_dim_print!=-1),str(max_dim_print),(min_dim_print!=-1),str(min_dim_print),
54
+ True, True, '', '', indices, indptr,(est_max_dim!=-1),str(est_max_dim),
55
+ False)
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyflagsercount
3
+ Version: 0.2.0
4
+ Summary: A package for counting directed cliques in directed graphs
5
+ Author-Email: "Jason P. Smith" <jasonsmith.bath@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 Jason Smith
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/JasonPSmith/flagser-count
29
+ Requires-Python: >=3.9
30
+ Requires-Dist: numpy>=1.17.0
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest; extra == "test"
33
+ Description-Content-Type: text/markdown
34
+
35
+ # flagser-count
36
+
37
+ A program for counting directed cliques in directed graphs, adapted from https://github.com/luetge/flagser.
38
+
39
+ ## Python package (pyflagsercount)
40
+
41
+ ```sh
42
+ pip install pyflagsercount # from PyPI (once published)
43
+ pip install . # from a local checkout
44
+ pip install git+https://github.com/JasonPSmith/flagser-count.git
45
+ ```
46
+
47
+ Python ≥ 3.9. Source installs need a C++ compiler; CMake ≥ 3.15 is fetched automatically by the build frontend if not already present. Pre-built wheels are produced by CI for Linux x86_64, macOS arm64, macOS x86_64, and Windows x64 across CPython 3.9–3.13.
48
+
49
+ ### Testing
50
+
51
+ ```sh
52
+ pip install -e .[test]
53
+ (cd test && python run_test.py)
54
+ ```
55
+
56
+ The test runner shells out to the standalone `flagser-count` binary, so build it first with `make` (see below) before running.
57
+
58
+ ## Standalone CLI (flagser-count, flagser-count-individ)
59
+
60
+ To build the C++ command-line binaries, clone the repo and run `make`:
61
+
62
+ ```sh
63
+ git clone https://github.com/JasonPSmith/flagser-count.git
64
+ cd flagser-count
65
+ make
66
+ ```
67
+
68
+ This produces `./flagser-count` and `./flagser-count-individ` in the repo root. Requirements: a C++14 compiler with `-pthread` support (gcc ≥ 6.4 on Linux).
69
+
70
+ To verify the CLI:
71
+
72
+ ```sh
73
+ (cd test && python run_test.py)
74
+ ```
75
+
76
+ ## License
77
+
78
+ See [LICENSE](LICENSE).
@@ -0,0 +1,7 @@
1
+ pycount.cp39-win_amd64.pyd,sha256=LvfWCSXNXf10cJc-RGIOorEtFGbnNponQnFSqMHaFP8,287232
2
+ pyflagsercount/__init__.py,sha256=eQHg2Uw0ZIzfz7Aqwd3wVKQY52Ebl8-kTeUvnZAp-NE,123
3
+ pyflagsercount/flagser_functions.py,sha256=ZhDc72p4FqhBF6BiWYKTn41rL9jbFPzwc17bYO-LHO8,3958
4
+ pyflagsercount-0.2.0.dist-info/METADATA,sha256=Ied1NqGSXjBDevsDEPj7R4XBNhXZ7regG0m5vAJj1TU,2998
5
+ pyflagsercount-0.2.0.dist-info/WHEEL,sha256=8jl2GQ796zU1Y5FlbDT-sIzqo9NXxa7EG6NBrKnCInM,104
6
+ pyflagsercount-0.2.0.dist-info/licenses/LICENSE,sha256=94cxosrHhQVMmmx6oYmwtr8INzBF8FPqTdW74J13ebA,1089
7
+ pyflagsercount-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: scikit-build-core 0.12.2
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-cp39-win_amd64
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Jason Smith
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.