Skip to main content

Python module for minplus algebra.

Project description

MinPlus-Algebra

MinPlus-Algebra is a universal and powerful library for the ability to switch from nonlinear to linear systems and perform convolutional operations. The addition operation is replaced by the infimum operation. The multiplication operation is replaced by the addition operation. This approach is actively used in Network Calculus.

In MinPlus algebra, there are 3 basic operations for processing functions and combinations of functions: Convolution, Sub-Add Closure and Deconvolution. You can see examples of function handling below.

Installation

The library is available in PyPI: https://pypi.org/project/minplus-algebra/

If you want to install this library to your project, you only need to enter one command in the terminal:

pip install minplus-algebra

If you need a specific version of the library, then add:

pip install minplus-algebra==<version>

In order to delete the library, you need to:

pip uninstall minplus-algebra 

Available operations in the library

In general

The library is implemented for the ability to perform convolutional operations for both datasets and functions of the form f(x). The library has the ability to convert a dataset into a piecewise linear function, or vice versa, a piecewise linear function into a dataset. In the directory with examples, you can find an example of implementing convolutional operations for datasets and functions. You can't collapse a function with a dataset and a dataset with a function, first of all, convert one to the other using the library functions.

Convolution

The convolution is an infimum over all sums of functions f and g depending on t - s and s, respectively, where s is an argument running from 0 to t. The convolution can be defined by the formula:

image.png

Next, you can see an example of the convolution of two curves: green and blue.

image.png

Sub-additive closure

The sub-additive closure is introduced as the minimum among all convolutions of different order, that is, the search for the minimum among two convoluted functions, three, and so on. Formally, it can be described as:

image.png

where $\delta_T$ is:

image.png

The result of a sub-additive closure depending on n convolutions:

image.png

Deconvolution:

The deconvolution is an supremum over all subs of functions f and g depending on t + u and u, respectively, where u ≥ 0. The deconvolution can be defined by the formula:

image.png

Next, you can see an example of the deconvolution of two curves: green and blue.

image.png

Other operations:

The secondary operations available in the library are the search for the L1 norm, minimizing it within the specified limits, and adding a constant to a function or dataset.

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

minplus_algebra-1.0.16.tar.gz (8.0 kB view details)

Uploaded Source

File details

Details for the file minplus_algebra-1.0.16.tar.gz.

File metadata

  • Download URL: minplus_algebra-1.0.16.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for minplus_algebra-1.0.16.tar.gz
Algorithm Hash digest
SHA256 09580d1c76033b575e871cfb0f1dd9dd83e13306d57b716407ae5d6954985be6
MD5 00376d4e37171e307647598230dd0a18
BLAKE2b-256 fd86a9a319e7da542d5273968b46a605fde0eafbf4573fd4c1aa9d3ee23f1250

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