Package ai.domain.boxes

Examples of ai.domain.boxes.IntegerBoxes.join()


    if (parsedDescription.size() == 0)
      return IntegerBoxes.getInitialValue();
    IntegerBoxes result = IntegerBoxes.BOTTOM;
    for(Map<Variable, Interval> item: parsedDescription) {
      NonRelationalDomain<Interval> parsedItem = intvParser.createInitialValue(item);
      result = result.join(IntegerBoxesHelper.fromIntervalBox(parsedItem));
    }
    return result;
  }

  @Override
View Full Code Here


  public void joinOneDimension() {
    // 1 dimension
    IntegerBoxes first = getSingleBoxAndVerify(new IntervalValue(1, 2));
    IntegerBoxes second = getSingleBoxAndVerify(new IntervalValue(2, 4));
    verifyResult(first.join(second), prepareBox(new IntervalValue(1, 4)));
    verifyResult(second.join(first), prepareBox(new IntervalValue(1, 4)));

    first = getSingleBoxAndVerify(new IntervalValue(1, 2));
    second = getSingleBoxAndVerify(new IntervalValue(3, 4));
    verifyResult(first.join(second), prepareBox(new IntervalValue(1, 4)));
    verifyResult(second.join(first), prepareBox(new IntervalValue(1, 4)));
View Full Code Here

    verifyResult(second.join(first), prepareBox(new IntervalValue(1, 4)));

    first = getSingleBoxAndVerify(new IntervalValue(1, 2));
    second = getSingleBoxAndVerify(new IntervalValue(3, 4));
    verifyResult(first.join(second), prepareBox(new IntervalValue(1, 4)));
    verifyResult(second.join(first), prepareBox(new IntervalValue(1, 4)));

    first = getSingleBoxAndVerify(new IntervalValue(1, 2));
    second = getSingleBoxAndVerify(new IntervalValue(4, 5));
    verifyResult(first.join(second), prepareBox(new IntervalValue(1, 2)), prepareBox(new IntervalValue(4, 5)));
    verifyResult(second.join(first), prepareBox(new IntervalValue(1, 2)), prepareBox(new IntervalValue(4, 5)));
View Full Code Here

    verifyResult(second.join(first), prepareBox(new IntervalValue(1, 4)));

    first = getSingleBoxAndVerify(new IntervalValue(1, 2));
    second = getSingleBoxAndVerify(new IntervalValue(4, 5));
    verifyResult(first.join(second), prepareBox(new IntervalValue(1, 2)), prepareBox(new IntervalValue(4, 5)));
    verifyResult(second.join(first), prepareBox(new IntervalValue(1, 2)), prepareBox(new IntervalValue(4, 5)));

    first = first.join(second);
    second = getSingleBoxAndVerify(new IntervalValue(3, Double.POSITIVE_INFINITY));
    verifyResult(first.join(second), prepareBox(new IntervalValue(1, Double.POSITIVE_INFINITY)));
    verifyResult(second.join(first), prepareBox(new IntervalValue(1, Double.POSITIVE_INFINITY)));
View Full Code Here

    verifyResult(second.join(first), prepareBox(new IntervalValue(1, 2)), prepareBox(new IntervalValue(4, 5)));

    first = first.join(second);
    second = getSingleBoxAndVerify(new IntervalValue(3, Double.POSITIVE_INFINITY));
    verifyResult(first.join(second), prepareBox(new IntervalValue(1, Double.POSITIVE_INFINITY)));
    verifyResult(second.join(first), prepareBox(new IntervalValue(1, Double.POSITIVE_INFINITY)));
  }

  @Test
  public void meetOneDimension() {
    // 1 dimension
View Full Code Here

  }
 
  private IntegerBoxes oneDimensionalBox(IntervalValue... data) {
    IntegerBoxes result = IntegerBoxes.BOTTOM;
    for(IntervalValue val: data)
      result = result.join(IntegerBoxesHelper.fromIntervalBox(prepareBox(val)));
    return result;
  }
 
  @Test
  public void testOneDimensionNoThresholds01() {
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.