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.2.tar.gz
(8.5 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.2-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file dynalglib-1.2.tar.gz.
File metadata
- Download URL: dynalglib-1.2.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f11bec44abfd1d7e45c26715a1a6e8110ccabc86776343da28adab964c24f693
|
|
| MD5 |
c1f6d4e60c70304670d7daa8861197bc
|
|
| BLAKE2b-256 |
3cb508151fcc72ef84fd1d9b1ed6df78d5692ce690dc57ef05a25eafac5b39ca
|
File details
Details for the file dynalglib-1.2-py3-none-any.whl.
File metadata
- Download URL: dynalglib-1.2-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 |
cf482658a3b1f22e1527aba9f49dd7abb7f3ce9e87d3718025acdbc950327659
|
|
| MD5 |
9425a48860bb225bdd3ac7801a09ddcc
|
|
| BLAKE2b-256 |
180adbfe01deb45771d261866c6cb35e599e3547d35c92047b8dcf88cdcf68fb
|