ninja.pranav.algorithms:kombin

KombiN is an algorithm to get index for combination pair or to get combination pair from index, where all possible combination pairs from two finite sets are sorted by their weight in ascending order.

Лицензия

Лицензия

Категории

Категории

Ninja Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

ninja.pranav.algorithms
Идентификатор

Идентификатор

kombin
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

ninja.pranav.algorithms:kombin
KombiN is an algorithm to get index for combination pair or to get combination pair from index, where all possible combination pairs from two finite sets are sorted by their weight in ascending order.
Ссылка на сайт

Ссылка на сайт

https://github.com/pranav-ninja/KombiN
Система контроля версий

Система контроля версий

https://github.com/pranav-ninja/KombiN/tree/master/

Скачать kombin

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/ninja.pranav.algorithms/kombin/ -->
<dependency>
    <groupId>ninja.pranav.algorithms</groupId>
    <artifactId>kombin</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/ninja.pranav.algorithms/kombin/
implementation 'ninja.pranav.algorithms:kombin:1.0.0'
// https://jarcasting.com/artifacts/ninja.pranav.algorithms/kombin/
implementation ("ninja.pranav.algorithms:kombin:1.0.0")
'ninja.pranav.algorithms:kombin:jar:1.0.0'
<dependency org="ninja.pranav.algorithms" name="kombin" rev="1.0.0">
  <artifact name="kombin" type="jar" />
</dependency>
@Grapes(
@Grab(group='ninja.pranav.algorithms', module='kombin', version='1.0.0')
)
libraryDependencies += "ninja.pranav.algorithms" % "kombin" % "1.0.0"
[ninja.pranav.algorithms/kombin "1.0.0"]

Зависимости

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.13.1

Модули Проекта

Данный проект не имеет модулей.

KombiN

Maven Central NuGet npm (scoped) PyPI

KombiN is an algorithm that gives Index # of weighted combination and back, works with combinations of two finite sets ordered by sum and then by difference of combination, without generating and enumerating through possible combinations.

When to use KombiN?

Let's say we have two sets:

Set A = { Apple = 0, Banana = 1, Cucumber = 2 }

Set B = { CEO = 0, CFO = 1, CSO = 2 }

Now get all possible unique combinations for both sets and sort first by sum of combination and after by difference of combination and in the end give Index # to all combinations.

In above example, both sets have zero-based index so KombiN will have output as shown in left side Table below. For example, both sets are in DataTable with Non-zero index, In that case KombiN will have output as shown in right side Table below.

In short, It provides zero and non-zero index based on type of index used in both sets.

Index # ai bi Index # ai bi
0 0 0 1 1 1
1 0 1 2 1 2
2 1 0 3 2 1
3 0 2 4 1 3
4 1 1 5 2 2
5 2 0 6 3 1
6 1 2 7 2 3
7 2 1 8 3 2
8 2 2 9 3 3

You can use KombiN for

  1. Finding the Index # of particular combination
  2. Finding the Combination of particular Index #.

Версии библиотеки

Версия
1.0.0