Package com.clarkparsia.pellet.datatypes.types.real

Examples of com.clarkparsia.pellet.datatypes.types.real.ContinuousRealInterval.intersection()


  public void intersectionEmpty() {
    final ContinuousRealInterval a = interval( null, 0d, false, true );
    final ContinuousRealInterval b = interval( 1d, null, true, false );

    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


  public void intersectionMeets() {
    final ContinuousRealInterval a = interval( null, 2.1, false, false );
    final ContinuousRealInterval b = interval( 2.1, null, true, false );

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

    assertEquals( IntervalRelations.MEETS, a.compare( b ) );
    assertEquals( IntervalRelations.MET_BY, b.compare( a ) );
  }
View Full Code Here

  public void intersectionStarts1() {
    final ContinuousRealInterval a = interval( 2.1, 3.1, true, true );
    final ContinuousRealInterval b = interval( 2.1, null, true, false );

    assertEquals( a, a.intersection( b ) );
    assertEquals( a, b.intersection( a ) );

    assertEquals( IntervalRelations.STARTS, a.compare( b ) );
    assertEquals( IntervalRelations.STARTED_BY, b.compare( a ) );
  }
View Full Code Here

  public void intersectionStarts2() {
    final ContinuousRealInterval a = interval( 2.1, 3.1, false, true );
    final ContinuousRealInterval b = interval( 2.1, null, false, false );

    assertEquals( a, a.intersection( b ) );
    assertEquals( a, b.intersection( a ) );

    assertEquals( IntervalRelations.STARTS, a.compare( b ) );
    assertEquals( IntervalRelations.STARTED_BY, b.compare( a ) );
  }
View Full Code Here

  public void intersectionStarts3() {
    final ContinuousRealInterval a = interval( 2.1, 3.1, false, true );
    final ContinuousRealInterval b = interval( 2.1, null, true, false );

    assertEquals( a, a.intersection( b ) );
    assertEquals( a, b.intersection( a ) );

    assertEquals( IntervalRelations.DURING, a.compare( b ) );
    assertEquals( IntervalRelations.CONTAINS, 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.