Skip to main content

Indexing combinations from two finite sets.

Project description

KombiN - Python 3 Library

This is the python implementation of KombiN, which is an algorithm to get index for combination pair and to get combination pair from index, where all possible combination pairs from two finite sets are sorted by their weight in ascending order.

Installation

Available on pypi

pip install kombin-algo-pranavpatel-ca

Usage

where set 'A' has 100 elements and set 'B' has 80 elements and both sets has zerobased indexing.

from kombin import Table

# Initialize object of Table class
myObj = Table(100, 80, true)

# Get Index value for combination pair(ai: 46, bi: 72)
index = myObj.GetIndexOfElements(46, 72)

# Get combination pair from index value
ai, bi = myObj.GetElementsAtIndex(index);

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

kombin_algo_pranavpatel_ca-1.0.0.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

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