pyalgo-tools
pyalgo-tools is a collection of various algorithms.
Example ドント方式で議席数を計算
print(dhondt(100, [45, 12, 34]))
[50 13 37]
Example 指定した合計となる部分集合の列挙
ary = [2, 1, 4, 3, 2]
for subset in enum_sub(ary, 4):
print(f"sum({subset}) = {sum(subset)}")
sum([2, 2]) = 4
sum([1, 3]) = 4
sum([4]) = 4
Example 2つの円の重なる面積
print(round(circle_overlap_area(0, 2, 1, 0, 1, 2), 4))
3.1416
Example 平面グラフ
import networkx as nx
g, pos = random_planar_graph(20, seed=1)
nx.draw(g, pos=pos)
Metadata
Release files for pyalgo-tools 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyalgo_tools-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Release files / pyalgo_tools-0.1.5-py3-none-any.whl
| Download URL | pyalgo_tools-0.1.5-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
227cb63a913d6a0a0def621b72b65a8d0a9dd6fe03b20f20f52f720393e9fbf5
|
|
BLAKE2b-256 checksum How to use checksums |
24538979bf55d71dfeaa9f349e4b1f9dd854b185a16636ae23925f07a6a016f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.5
|