dpaukov / combinatoricslib3

Combinatorial objects stream generators for Java.
Apache License 2.0
177 stars 24 forks source link

Make k-permutation API more easy to use #8

Closed fengertao closed 3 years ago

fengertao commented 3 years ago

Thanks dpaukov, very good library. I use this library validate my combination/permutation questions, it is easy to use and quick.

One minor issue is I use k-permutation very frequently, while current API is a little verbose

        Generator.combination(1, 2, 3)
            .simple(2)
            .stream()
            .forEach(combination -> Generator.permutation(combination)
                .simple()
                .forEach(System.out::println));

Can you help provide high level API like:

        Generator.permutation(1, 2, 3)
            .simple(2)
            .stream()
            .forEach(System.out::println));

Thanks a lot.

fengertao commented 3 years ago

Hi, Paukov:

Any comments on the updated PR?

fengertao commented 3 years ago

Hi, Paukov:

Last month I have updated PR per our discussion.

Any comments on the updated PR?

BR Charlie

dpaukov commented 3 years ago

This change will be included into the next release version 3.3.2 scheduled on May 2021.