Examples of OWLRealInterval


Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

  /**
   * Verify that an integer only interval with unequal bounds is not a point.
   */
  @Test
  public void isPointFalseOnly() {
    final OWLRealInterval a = interval( 1, 2, true, true, LineType.INTEGER_ONLY );

    assertFalse( a.isPoint() );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

  /**
   * Verify that a continuous interval with equal bounds is a point.
   */
  @Test
  public void isPointTrueCon() {
    final OWLRealInterval a = new OWLRealInterval( BigDecimal.valueOf( 0.1d ) );

    assertTrue( a.isPoint() );

    final OWLRealInterval b = interval( 0.1, 0.1, true, true, LineType.CONTINUOUS );

    assertTrue( b.isPoint() );

    assertEquals( a, b );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

  /**
   * Test getting a sub-interval less than an integer on an integer line.
   */
  @Test
  public void lessInt1() {
    final OWLRealInterval i = interval( 1, 5, true, true, LineType.INTEGER_ONLY );
    assertEquals( interval( 1, 3, true, true, LineType.INTEGER_ONLY ), i.less( 4 ) );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

   * Test getting a sub-interval less than the upper endpoint of an integer
   * interval
   */
  @Test
  public void lessInt2() {
    final OWLRealInterval i = interval( 1, 5, true, true, LineType.INTEGER_ONLY );
    assertEquals( interval( 1, 4, true, true, LineType.INTEGER_ONLY ), i.less( 5 ) );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

    assertEquals( interval( 1, 4, true, true, LineType.INTEGER_ONLY ), i.less( 5 ) );
  }

  @Test
  public void unboundContainsAll() {
    final OWLRealInterval interval = new OWLRealInterval( null, null, false, false,
        LineType.CONTINUOUS );

    assertFalse( interval.boundLower() );
    assertFalse( interval.boundUpper() );

    assertFalse( interval.isPoint() );

    assertTrue( interval.contains( -1 ) );
    assertTrue( interval.contains( 0 ) );
    assertTrue( interval.contains( 1 ) );
    assertTrue( interval.contains( BigDecimal.valueOf( -0.31d ) ) );
    assertTrue( interval.contains( BigDecimal.valueOf( 0.13d ) ) );
    assertTrue( interval.contains( BigDecimal.valueOf( Long.MAX_VALUE ).add(
        BigDecimal.valueOf( Long.MAX_VALUE ) ).add( BigDecimal.valueOf( 0.123d ) ) ) );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

*/
public class OWLRealIntervalTests {

  public static OWLRealInterval interval(Double l, Double u, boolean il, boolean iu,
      OWLRealInterval.LineType t) {
    return new OWLRealInterval( l == null
      ? null
      : BigDecimal.valueOf( l ), u == null
      ? null
      : BigDecimal.valueOf( u ), il, iu, t );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

      : BigDecimal.valueOf( u ), il, iu, t );
  }

  public static OWLRealInterval interval(Integer l, Integer u, boolean il, boolean iu,
      OWLRealInterval.LineType t) {
    return new OWLRealInterval( l, u, il, iu, t );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

   * Verify that exclusive endpoints are not contained within the interval.
   * For continuous intervals.
   */
  @Test
  public void exclusiveEndpointsCon() {
    final OWLRealInterval interval = interval( -1.3, 2.5, false, false, LineType.CONTINUOUS );
    assertFalse( interval.contains( BigDecimal.valueOf( -1.3d ) ) );
    assertFalse( interval.contains( BigDecimal.valueOf( 2.5d ) ) );
    assertTrue( interval.contains( 0 ) );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

   * Verify that exclusive endpoints are not contained within the interval.
   * For no integer intervals with non-integer bounds.
   */
  @Test
  public void exclusiveEndpointsNoI1() {
    final OWLRealInterval interval = interval( -1.3, 2.5, false, false,
        LineType.INTEGER_EXCLUDED );
    assertFalse( interval.contains( BigDecimal.valueOf( -1.3d ) ) );
    assertFalse( interval.contains( BigDecimal.valueOf( 2.5d ) ) );
    assertFalse( interval.contains( 0 ) );
    assertTrue( interval.contains( BigDecimal.valueOf( 0.1d ) ) );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

   * Verify that exclusive endpoints are not contained within the interval.
   * For no integer intervals with integer bounds.
   */
  @Test
  public void exclusiveEndpointsNoI2() {
    final OWLRealInterval interval = interval( -1, 3, false, false, LineType.INTEGER_EXCLUDED );
    assertFalse( interval.contains( -1 ) );
    assertFalse( interval.contains( 3 ) );
    assertFalse( interval.contains( 0 ) );
    assertTrue( interval.contains( BigDecimal.valueOf( 0.1d ) ) );
  }
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.