Examples of OWLRealInterval


Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

   * Verify that exclusive endpoints are not contained within the interval.
   * For integer only intervals with integer bounds.
   */
  @Test
  public void exclusiveEndpointsOnly() {
    final OWLRealInterval interval = interval( -1, 3, false, false, LineType.INTEGER_ONLY );
    assertFalse( interval.contains( -1 ) );
    assertFalse( interval.contains( 3 ) );
    assertTrue( interval.contains( 0 ) );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

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

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

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

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

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

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

   * Verify that inclusive endpoints are contained within the interval. For no
   * integer intervals with non-integer bounds.
   */
  @Test
  public void inclusiveEndpointsNoI1() {
    final OWLRealInterval interval = interval( -1.3, 2.5, true, true, LineType.INTEGER_EXCLUDED );
    assertTrue( interval.contains( BigDecimal.valueOf( -1.3d ) ) );
    assertTrue( 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 inclusive endpoints are not contained within the interval for
   * no integer intervals with integer bounds.
   */
  @Test
  public void inclusiveEndpointsNoI2() {
    final OWLRealInterval interval = interval( -1, 3, true, true, 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

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

   * Verify that inclusive endpoints are contained within the interval. For
   * integer only intervals with integer bounds.
   */
  @Test
  public void inclusiveEndpointsOnly() {
    final OWLRealInterval interval = interval( -1, 3, true, true, LineType.INTEGER_ONLY );
    assertTrue( interval.contains( -1 ) );
    assertTrue( interval.contains( 3 ) );
    assertTrue( interval.contains( 0 ) );
  }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.OWLRealInterval

   * bounds an empty intersection is identified
   */
  @Test
  public void intersectionEmpty() {
    for( LineType t : LineType.values() ) {
      final OWLRealInterval a = interval( null, 0, false, true, t );
      final OWLRealInterval b = interval( 1, null, true, false, t );

      assertNull( a.intersection( b ) );
      assertNull( b.intersection( a ) );

      assertEquals( IntervalRelations.PRECEDES, a.compare( b ) );
      assertEquals( IntervalRelations.PRECEDED_BY, b.compare( a ) );
    }
  }
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.