Dynalglib is a library which is designed to solve some of dynamic programming algorithms in Python.
Project description
dynalglib
Dynalglib is a library which is designed to solve problems using dynamic programming algorithms in Python.
Released algorithms:
- Fibonacci
- Knapsack Problem
- Traveling Salesman Problem
- Resource Allocation Problem
- Coin Change Problem
Installing
To install this library you should run:
pip install dynalglib
To update the library you should run:
pip install -U dynalglib
A simple example
from dynalglib import Item
from dynalglib import Knapsack
knapsack = Knapsack(
items=[
Item(name="apple", weight=2, value=3, quantity=6),
Item(name="pineapple", weight=4, value=8, quantity=3),
Item(name="kiwi", weight=3, value=6, quantity=3),
Item(name="strawberry", weight=1, value=7, quantity=8),
],
capacity=10,
)
knapsack.fill()
print(knapsack.total_value)
print(knapsack)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dynalglib-1.1.tar.gz
(8.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dynalglib-1.1-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file dynalglib-1.1.tar.gz.
File metadata
- Download URL: dynalglib-1.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc46620a7b159eaa491b5924eb941283aac1554cfa7a9b8009540cdee2158d6a
|
|
| MD5 |
394f026079b9896be1ee8156ba364d72
|
|
| BLAKE2b-256 |
ce37a0617b2ba6df8fd10f0034c9a64a01914d91ca788f91c9f8d8b6efc47d97
|
File details
Details for the file dynalglib-1.1-py3-none-any.whl.
File metadata
- Download URL: dynalglib-1.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81fb6ba6d7c37bf30ed3e0f739930927a871a003a19abf3ece5400d9c8dd3c8e
|
|
| MD5 |
ac98bafd18643bb5c8827585f9f40172
|
|
| BLAKE2b-256 |
a89fb4acd34be5821778b3c1d7fe81dd1ba20f4c80e0c2cc35aa48cf2a67b82d
|