Skip to content

possible repeat combination is the same item value is repeated in the container #10

@vickoza

Description

@vickoza
std::vector<int> test = {1,1,2,3,4,5};
auto count = 0;
for (auto&& x : discreture::combinations(test, 3))
    std::cout << ++count << " -- "<< x << '\n';

1 -- 1 1 2
2 -- 1 1 3
3 -- 1 2 3
4 -- 1 2 3
5 -- 1 1 4
6 -- 1 2 4
7 -- 1 2 4
8 -- 1 3 4
9 -- 1 3 4
10 -- 2 3 4
11 -- 1 1 5
12 -- 1 2 5
13 -- 1 2 5
14 -- 1 3 5
15 -- 1 3 5
16 -- 2 3 5
17 -- 1 4 5
18 -- 1 4 5
19 -- 2 4 5
20 -- 3 4 5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions