What has been done?:
- Metrics computation has been updated
- The implementation of bipartite graphs has been changed
- Cpp implementation of linegraph
- Added the ability to use the package of accelerated functions on hypergraphs
Metrics computation has been updated
The computation of the linegraph vector centrality metric was accelerated by using the с++ instead of python. For comparison, implementations using the networkx.Graph class were retained.
H_enron = xgi.load_xgi_data("plant-pollinator-mpl-034")
H_enron_cleaned = H_enron.cleanup(
multiedges=False, singletons=False, isolates=False, relabel=True, in_place=False
)
start_time = time.time()
xgi.centrality.line_vector_centrality(H_enron_cleaned)
middle_time = time.time()
xgi_optimized.vector_centrality(H_enron_cleaned, 3)
end_time = time.time()
print(f"Время выполнения python: {(middle_time-start_time):.6f} секунд")
print(f"Время выполнения c++: {(end_time-middle_time):.6f} секунд")
The implementation of bipartite graphs has been changed.
The implementation for working with bipartite graphs was modified: the igraph.Graph class is now used instead of networkx.Graph for converting from a Hypergraph to a bipartite graph and back to a Hypergraph .
hg = xgi.Hypergraph()
hg.add_edges_from(
[[1, 2, 3], [3, 4, 5,8], [1, 4, 10, 11, 12], [7,0,8], [5,7,2]]
)
bpg = xgi_optimized.biparite_graph.to_bipartite_graph(hg)
Cpp implementation of сhecking graph connectivity
size = 38
hg = xgi.fast_random_hypergraph(size,[0.1, 0.2, 0.02,0.04])
start_time = time.time()
xgi_optimized.connected.is_connected(hg)
middle_time = time.time()
xgi.centrality.is_connected(hg)
end_time = time.time()
print(f"Время выполнения c++: {(middle_time-start_time):.6f} секунд")
print(f"Время выполнения python: {(end_time-middle_time):.6f} секунд")
Cpp implementation of сhecking graph connectivity
size = 38
hg = xgi.fast_random_hypergraph(size,[0.1, 0.2, 0.02,0.04])
start_time = time.time()
xgi_optimized.connected.is_connected(hg)
middle_time = time.time()
xgi.centrality.is_connected(hg)
end_time = time.time()
print(f"Время выполнения c++: {(middle_time-start_time):.6f} секунд")
print(f"Время выполнения python: {(end_time-middle_time):.6f} секунд")
Added the ability to use the package of accelerated functions on hypergraphs
pip install xgi_optimized
Release files for xgi-optimized 0.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xgi_optimized-0.11.1.tar.gz | 59.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xgi_optimized-0.11.1-cp313-cp313-manylinux_2_17_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.17+ x86-64 | Details |
Total release size: 350.8 kB
Release files / xgi_optimized-0.11.1.tar.gz
| Download URL | xgi_optimized-0.11.1.tar.gz |
|---|---|
| Size | 59.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9043abf80e33bc4dc222861ea244b6ab4f0be99cb41de7764b88d2e5b1d1f7ce
|
|
BLAKE2b-256 checksum How to use checksums |
2c1f9c7486f133623ae7a575c12e79b6ade15794c53e190a1d07c351b77e66a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / xgi_optimized-0.11.1-cp313-cp313-manylinux_2_17_x86_64.whl
| Download URL | xgi_optimized-0.11.1-cp313-cp313-manylinux_2_17_x86_64.whl |
|---|---|
| Size | 291.1 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0a808c9a4c662887541bc6c4fffe682070fbe92f604cf81c821cef5966aed086
|
|
BLAKE2b-256 checksum How to use checksums |
3e7cc0b39f5125ce7df2fb0bd526d1dc1b107c0552896a625676164291f6d766
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|