use of org.knime.base.node.mine.treeensemble2.data.TreeNominalColumnData.FullBinarySplitEnumeration in project knime-core by knime.
the class FullBinarySplitEnumerationTest method testBinarySplitEnumerationCountTuples.
@Test(timeout = 2000L)
public void testBinarySplitEnumerationCountTuples() {
byte maxNrUniqueValues = 10;
for (byte nrUniqueValues = 2; nrUniqueValues < maxNrUniqueValues; nrUniqueValues++) {
BinarySplitEnumeration instance = new FullBinarySplitEnumeration(nrUniqueValues);
final int expectedTupleCount = (int) Math.pow(2, nrUniqueValues - 1) - 1;
int count = 0;
do {
count++;
} while (instance.next());
Assert.assertEquals("For test count = " + nrUniqueValues, expectedTupleCount, count);
}
}
Aggregations