Skip to content
Success

Changes

Summary

  1. gaming-contest: fixed various border cases in CombinatoricsHelper (details)
Commit 4daced9e478bf1e06df4c6f40e9a759090b2cd62 by Christoph Schulz
gaming-contest: fixed various border cases in CombinatoricsHelper

This includes "invalid" cases like n<k in n-over-k as well as an one-off
error in returning true/false in CombinationSplitIterator.tryAdvance()
(according to the documentation, we have to return false if there is no
element *on entry* to process; we formerly returned false if there was
no element *on exit*). The unit tests were extended accordingly.
The file was modifiedgaming-contest/src/main/java/de/fhdw/gaming/contest/util/CombinatoricsHelper.java
The file was modifiedgaming-contest/src/test/java/de/fhdw/gaming/contest/util/CombinatoricsHelperTest.java
The file was modifiedgaming-contest/src/main/java/de/fhdw/gaming/contest/util/CombinationSplitIterator.java