Skip to main content

Dynalglib is a library which is designed to solve some of 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.2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

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

Hashes for dynalglib-1.2.tar.gz
Algorithm Hash digest
SHA256 f11bec44abfd1d7e45c26715a1a6e8110ccabc86776343da28adab964c24f693
MD5 c1f6d4e60c70304670d7daa8861197bc
BLAKE2b-256 3cb508151fcc72ef84fd1d9b1ed6df78d5692ce690dc57ef05a25eafac5b39ca

See more details on using hashes here.

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

Hashes for dynalglib-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cf482658a3b1f22e1527aba9f49dd7abb7f3ce9e87d3718025acdbc950327659
MD5 9425a48860bb225bdd3ac7801a09ddcc
BLAKE2b-256 180adbfe01deb45771d261866c6cb35e599e3547d35c92047b8dcf88cdcf68fb

See more details on using hashes here.

Supported by

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