Module streamplify

The streamplify artifact

Лицензия

Лицензия

Группа

Группа

org.beryx
Идентификатор

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

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

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

1.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Module streamplify
The streamplify artifact
Ссылка на сайт

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

https://github.com/beryx/streamplify
Система контроля версий

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

https://github.com/beryx/streamplify

Скачать streamplify

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.8.0-beta2

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

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

PRs Welcome License Build Status

Streamplify

The goal of this library is to provide useful Java 8 streams and to assist you in building new streams that allow efficient parallel processing.

The utilities offered by Streamplify include:

  • combinatorics streams: permutations, combinations, Cartesian products, power sets, derangements, partial permutations.
  • classes that help you implement your own efficient parallel streams.

Example

The following code snippet uses a parallel permutation stream to find all solutions of the N-Queens problem for n = 10.

System.out.println(new Permutations(10)
        .parallelStream()
        .filter(perm -> {
            for(int i = 0; i < perm.length - 1; i++) {
                for(int j = i + 1; j < perm.length; j++) {
                    if(Math.abs(perm[j] - perm[i]) == j - i) return false;
                }
            }
            return true;
        })
        .map(perm -> IntStream.range(0, perm.length)
                .mapToObj(i -> "(" + (i + 1) + "," + (perm[i] + 1) + ")")
                .collect(Collectors.joining(", ")))
        .collect(Collectors.joining("\n")));

Before starting to use the library, take a look at the examples, read the documentation and consult the javadoc.

Streamplify is available in Maven Central and JCenter.

Contribute to this project!

We accept all types of contributions and we are very welcoming to first time contributors.

Read how to contribute and jump in!

org.beryx

Beryx

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

Версия
1.1.1
1.1.0
1.0.0