Examples of twoToThePowerOf()


Examples of org.mitre.medfacts.i2b2.util.CombinationGenerator.twoToThePowerOf()

    CombinationGenerator g = new CombinationGenerator();
    int inputSize = 4;
    List<Set<Integer>> combinations = g.generateCombinations(inputSize);


    int expectedSize = g.twoToThePowerOf(inputSize) - 1;
    int actualSize = combinations.size();
    assertEquals(String.format("number of combinations for an input size of %d should be %d instead of %d", inputSize, expectedSize, actualSize), expectedSize, actualSize);
  }

  @Ignore
View Full Code Here

Examples of org.mitre.medfacts.i2b2.util.CombinationGenerator.twoToThePowerOf()

  {
    CombinationGenerator g = new CombinationGenerator();

    int input = 0;
    int expectedOutput = 1;
    int actualOutput = g.twoToThePowerOf(input);

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);


    input = 1;
View Full Code Here

Examples of org.mitre.medfacts.i2b2.util.CombinationGenerator.twoToThePowerOf()

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);


    input = 1;
    expectedOutput = 2;
    actualOutput = g.twoToThePowerOf(input);

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);

    input = 2;
    expectedOutput = 4;
View Full Code Here

Examples of org.mitre.medfacts.i2b2.util.CombinationGenerator.twoToThePowerOf()

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);

    input = 2;
    expectedOutput = 4;
    actualOutput = g.twoToThePowerOf(input);

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);

    input = 3;
    expectedOutput = 8;
View Full Code Here

Examples of org.mitre.medfacts.i2b2.util.CombinationGenerator.twoToThePowerOf()

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);

    input = 3;
    expectedOutput = 8;
    actualOutput = g.twoToThePowerOf(input);

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);

    input = 4;
    expectedOutput = 16;
View Full Code Here

Examples of org.mitre.medfacts.i2b2.util.CombinationGenerator.twoToThePowerOf()

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);

    input = 4;
    expectedOutput = 16;
    actualOutput = g.twoToThePowerOf(input);

    assertEquals(String.format("2 to the %d should equal %d; actual value was %d", input, expectedOutput, actualOutput), expectedOutput, actualOutput);

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.