Algorithm of etc.
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file pyalgo_tools-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pyalgo_tools-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1730ad60ee595bf728721ab22cf37d6f7860ea9cd1d028d770dfeb3722beffd0 |
|
MD5 | 4ce1cc1ea7b0c1c118b146f57967230a |
|
BLAKE2b-256 | 50dd717b17e3f6a368e8428e15267664aeb2b3e015e015ebfa90739f8abd8c41 |