Package ai.domain.interval

Examples of ai.domain.interval.IntervalExpressionSemantics.divide()


  public void testDivide(){
    IntervalExpressionSemantics sem = new IntervalExpressionSemantics();
    //bottom
    for(Interval val: Arrays.asList(Interval.BOTTOM, new Interval(1,2), new Interval(1,Double.POSITIVE_INFINITY),
        new Interval(Double.NEGATIVE_INFINITY, 3), TOP)){
      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(val, Interval.BOTTOM));
      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(Interval.BOTTOM, val));
    }
    //others
    org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(new Interval(1,1), new Interval(0,0)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
View Full Code Here


    IntervalExpressionSemantics sem = new IntervalExpressionSemantics();
    //bottom
    for(Interval val: Arrays.asList(Interval.BOTTOM, new Interval(1,2), new Interval(1,Double.POSITIVE_INFINITY),
        new Interval(Double.NEGATIVE_INFINITY, 3), TOP)){
      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(val, Interval.BOTTOM));
      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(Interval.BOTTOM, val));
    }
    //others
    org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(new Interval(1,1), new Interval(0,0)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
View Full Code Here

        new Interval(Double.NEGATIVE_INFINITY, 3), TOP)){
      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(val, Interval.BOTTOM));
      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(Interval.BOTTOM, val));
    }
    //others
    org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(new Interval(1,1), new Interval(0,0)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(4, 100)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(-100, -4)));
    org.junit.Assert.assertEquals(Interval.TOP, sem.divide(new Interval(1,1), new Interval(-100, 100)));
View Full Code Here

      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(val, Interval.BOTTOM));
      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(Interval.BOTTOM, val));
    }
    //others
    org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(new Interval(1,1), new Interval(0,0)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(4, 100)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(-100, -4)));
    org.junit.Assert.assertEquals(Interval.TOP, sem.divide(new Interval(1,1), new Interval(-100, 100)));
    org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,6)));
View Full Code Here

      org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(Interval.BOTTOM, val));
    }
    //others
    org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(new Interval(1,1), new Interval(0,0)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(4, 100)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(-100, -4)));
    org.junit.Assert.assertEquals(Interval.TOP, sem.divide(new Interval(1,1), new Interval(-100, 100)));
    org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,6)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,4)));
View Full Code Here

    }
    //others
    org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(new Interval(1,1), new Interval(0,0)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(4, 100)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(-100, -4)));
    org.junit.Assert.assertEquals(Interval.TOP, sem.divide(new Interval(1,1), new Interval(-100, 100)));
    org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,6)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,4)));
    org.junit.Assert.assertEquals(new Interval(2, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,2)));
View Full Code Here

    //others
    org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(new Interval(1,1), new Interval(0,0)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(4, 100)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(-100, -4)));
    org.junit.Assert.assertEquals(Interval.TOP, sem.divide(new Interval(1,1), new Interval(-100, 100)));
    org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,6)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,4)));
    org.junit.Assert.assertEquals(new Interval(2, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,2)));
    org.junit.Assert.assertEquals(new Interval(1, 10), sem.divide(new Interval(9,21), new Interval(2,5)));
View Full Code Here

    org.junit.Assert.assertEquals(Interval.BOTTOM, sem.divide(new Interval(1,1), new Interval(0,0)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(4, 100)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(-100, -4)));
    org.junit.Assert.assertEquals(Interval.TOP, sem.divide(new Interval(1,1), new Interval(-100, 100)));
    org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,6)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,4)));
    org.junit.Assert.assertEquals(new Interval(2, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,2)));
    org.junit.Assert.assertEquals(new Interval(1, 10), sem.divide(new Interval(9,21), new Interval(2,5)));
    org.junit.Assert.assertEquals(new Interval(-10, -1), sem.divide(new Interval(9,21), new Interval(-5,-2)));
View Full Code Here

    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(1,1), new Interval(0,1)));
    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(4, 100)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(-100, -4)));
    org.junit.Assert.assertEquals(Interval.TOP, sem.divide(new Interval(1,1), new Interval(-100, 100)));
    org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,6)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,4)));
    org.junit.Assert.assertEquals(new Interval(2, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,2)));
    org.junit.Assert.assertEquals(new Interval(1, 10), sem.divide(new Interval(9,21), new Interval(2,5)));
    org.junit.Assert.assertEquals(new Interval(-10, -1), sem.divide(new Interval(9,21), new Interval(-5,-2)));
  }
View Full Code Here

    org.junit.Assert.assertEquals(new Interval(Double.NEGATIVE_INFINITY, -1), sem.divide(new Interval(1,1), new Interval(-1, 0)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(4, 100)));
    org.junit.Assert.assertEquals(new Interval(0, 0), sem.divide(new Interval(1,1), new Interval(-100, -4)));
    org.junit.Assert.assertEquals(Interval.TOP, sem.divide(new Interval(1,1), new Interval(-100, 100)));
    org.junit.Assert.assertEquals(new Interval(0, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,6)));
    org.junit.Assert.assertEquals(new Interval(1, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,4)));
    org.junit.Assert.assertEquals(new Interval(2, Double.POSITIVE_INFINITY), sem.divide(new Interval(4,Double.POSITIVE_INFINITY), new Interval(2,2)));
    org.junit.Assert.assertEquals(new Interval(1, 10), sem.divide(new Interval(9,21), new Interval(2,5)));
    org.junit.Assert.assertEquals(new Interval(-10, -1), sem.divide(new Interval(9,21), new Interval(-5,-2)));
  }
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.