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

Examples of com.clarkparsia.pellet.datatypes.types.real.RestrictedRealDatatype.intersect()


  @Test
  public void maxExclusiveFacetNoI1() throws InvalidConstrainingFacetException {
    RestrictedDatatype<Number> dr = new RestrictedRealDatatype( dt, IntegerInterval
        .allIntegers(), ContinuousRealInterval.allReals(), ContinuousRealInterval
        .allReals() );
    dr = dr.intersect( new RestrictedRealDatatype( dt, IntegerInterval.allIntegers(), null,
        null ), true );
    dr = dr.applyConstrainingFacet( MAX_EXCLUSIVE.getName(), decimal( "3.5" ) );

    assertTrue( dr.contains( BigDecimal.valueOf( Long.MIN_VALUE ).subtract(
        BigDecimal.valueOf( 0.1 ) ) ) );
View Full Code Here


  @Test
  public void maxInclusiveFacetNoI1() throws InvalidConstrainingFacetException {
    RestrictedDatatype<Number> dr = new RestrictedRealDatatype( dt, IntegerInterval
        .allIntegers(), ContinuousRealInterval.allReals(), ContinuousRealInterval
        .allReals() );
    dr = dr.intersect( new RestrictedRealDatatype( dt, IntegerInterval.allIntegers(), null,
        null ), true );
    dr = dr.applyConstrainingFacet( MAX_INCLUSIVE.getName(), decimal( "3.5" ) );

    assertTrue( dr.contains( BigDecimal.valueOf( Long.MIN_VALUE ).subtract(
        BigDecimal.valueOf( 0.1 ) ) ) );
View Full Code Here

  @Test
  public void minExclusiveFacetNoI1() throws InvalidConstrainingFacetException {
    RestrictedDatatype<Number> dr = new RestrictedRealDatatype( dt, IntegerInterval
        .allIntegers(), ContinuousRealInterval.allReals(), ContinuousRealInterval
        .allReals() );
    dr = dr.intersect( new RestrictedRealDatatype( dt, IntegerInterval.allIntegers(), null,
        null ), true );
    dr = dr.applyConstrainingFacet( MIN_EXCLUSIVE.getName(), decimal( "3.5" ) );

    assertFalse( dr.contains( BigDecimal.valueOf( Long.MIN_VALUE ).subtract(
        BigDecimal.valueOf( 0.1 ) ) ) );
View Full Code Here

  @Test
  public void minInclusiveFacetNoI1() throws InvalidConstrainingFacetException {
    RestrictedDatatype<Number> dr = new RestrictedRealDatatype( dt, IntegerInterval
        .allIntegers(), ContinuousRealInterval.allReals(), ContinuousRealInterval
        .allReals() );
    dr = dr.intersect( new RestrictedRealDatatype( dt, IntegerInterval.allIntegers(), null,
        null ), true );
    dr = dr.applyConstrainingFacet( MIN_INCLUSIVE.getName(), decimal( "3.5" ) );

    assertFalse( dr.contains( BigDecimal.valueOf( Long.MIN_VALUE ).subtract(
        BigDecimal.valueOf( 0.1 ) ) ) );
View Full Code Here

  @Test
  public void minMaxIncIncNoI1() throws InvalidConstrainingFacetException {
    RestrictedDatatype<Number> dr = new RestrictedRealDatatype( dt, IntegerInterval
        .allIntegers(), ContinuousRealInterval.allReals(), ContinuousRealInterval
        .allReals() );
    dr = dr.intersect( new RestrictedRealDatatype( dt, IntegerInterval.allIntegers(), null,
        null ), true );
    dr = dr.applyConstrainingFacet( MIN_INCLUSIVE.getName(), decimal( "2.5" ) );
    dr = dr.applyConstrainingFacet( MAX_INCLUSIVE.getName(), decimal( "3.5" ) );

    assertFalse( dr.contains( 2 ) );
View Full Code Here

   */
  @Test
  public void containsNoI() {
    RestrictedDatatype<Number> dr = new RestrictedRealDatatype( dt, IntegerInterval
        .allIntegers(), null, null );
    dr = dr.intersect( new RestrictedRealDatatype( dt, IntegerInterval.allIntegers(), null,
        null ), true );

    assertFalse( dr.contains( (byte) 0 ) );
    assertFalse( dr.contains( Byte.MIN_VALUE ) );
    assertFalse( dr.contains( Byte.MAX_VALUE ) );
View Full Code Here

    assertTrue( dr.contains( 0 ) );
    assertTrue( dr.contains( decimal( "0.33" ) ) );
    assertTrue( dr.contains( rational( 1, 3 ) ) );

    dr = dr.intersect( new RestrictedRealDatatype( dt, IntegerInterval.allIntegers(),
        ContinuousRealInterval.allReals(), null ), true );

    assertFalse( dr.contains( 0 ) );
    assertFalse( dr.contains( decimal( "0.33" ) ) );
    assertTrue( dr.contains( rational( 1, 3 ) ) );
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.