Closed kivanval closed 9 months ago
Thank you, merged.
Actually, I don't really understand why it's not called ofCombinations()
Because it does not produce any combinations (with arbitrary r), but a partial case with r = 2. There's StreamEx#ofCombinations
method that produces any combination vectors.
By the way, there's the same problem in documentation in StreamEx.ofPairs
methods.
By the way, there's the same problem in documentation in
StreamEx.ofPairs
methods.
Can you change it yourself or do I have to make another pull request? :D For some reason I missed that StreamEx has such a method.
in EntryStream.java, in the ofPairs() methods, there was an error in the formula for the size of the output EntryStream.
The ofPairs() methods by its nature calculate all possible combinations of list items (Actually, I don't really understand why it's not called ofCombinations()).
The formula for combinations is as follows:
If we take our specific case, where r = 2, the formula will look like this: