Skip to main content

Dynalglib is a library which is designed to solve problems using dynamic programming algorithms in Python.

Project description

dynalglib

Tests Code style: black

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


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.3.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

dynalglib-1.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file dynalglib-1.3.tar.gz.

File metadata

  • Download URL: dynalglib-1.3.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

Hashes for dynalglib-1.3.tar.gz
Algorithm Hash digest
SHA256 d668451ea989e76cb4d018663bf914529fde46e1e84828b9cbdea8c1d9c443b2
MD5 e0c607df2186686a643ece5d6276fd38
BLAKE2b-256 892d5b402fba4857ec0e4cba9c6f68b4b7518f4453ffd9f1a6ecdedbb97de01a

See more details on using hashes here.

File details

Details for the file dynalglib-1.3-py3-none-any.whl.

File metadata

  • Download URL: dynalglib-1.3-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

Hashes for dynalglib-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea9cf954c8533275746fb1fff153ce2456c5a5bd5f761d7e795e7bf8d0ac3c63
MD5 38c11c308f863906b7d601cfcbcb4121
BLAKE2b-256 e5d50b8a4081fbf0feb676d87f100d09f6482aa61a096f72fd1ffab50ba7ae7f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page