Package org.mindswap.pellet.utils

Examples of org.mindswap.pellet.utils.GenericIntervalList$Interval


        }

        if ( optimizable )
        {
//          System.out.println( "interval = " + Util.printInterval( interval ) );
          final Interval sliceInterval = t.transform( new BoundingBox( interval ) ).getInterval();
//          System.out.println( "transformed interval = " + Util.printInterval( sliceInterval ) );
          if ( iterableSource.supportsOptimizedCursor( sliceInterval ) )
          {
            // check for FlatIterationOrder
            boolean flat = FlatIterationOrder.class.isInstance( iterableSource.subIntervalIterationOrder( sliceInterval ) );
View Full Code Here


    // doesn't fit the interval, will force unoptimized cursor
    final long[] dimensionsUnoptimized = new long[] { 5001, 5000, 2, 2 };

    // fits the interval, should be optimized
    final Interval interval = new FinalInterval( new long[] { 0, 0, 1, 1 }, new long[] { 4999, 4999, 1, 1 } );

    // create and fill images
    final ArrayImg< IntType, ? > arrayImg = ArrayImgs.ints( dimensions ); // fits
                                        // the
                                        // interval
View Full Code Here

    protected BaseXSDAtomicType( ATermAppl name, ValueSpace valueSpace ) {
        super( name );

        this.valueSpace = valueSpace;
        this.values = new GenericIntervalList( valueSpace.getMinValue(), valueSpace.getMaxValue(), valueSpace );
    }
View Full Code Here

    public AtomicDatatype intersection( AtomicDatatype dt ) {
        if( this == dt )
            return this;

        GenericIntervalList result = new GenericIntervalList( valueSpace );
        if( dt instanceof BaseXSDAtomicType ) {
            BaseXSDAtomicType other = (BaseXSDAtomicType) dt;

            GenericIntervalList original = new GenericIntervalList( values );
            Iterator it = other.values.iterator();
            while( it.hasNext() ) {
                GenericIntervalList.Interval interval = (GenericIntervalList.Interval) it.next();
                GenericIntervalList o = new GenericIntervalList( original );
                o.restrictToInterval( interval );
                result.addIntervalList( o );
            }
        }

        return create( result );
View Full Code Here

    public AtomicDatatype union( AtomicDatatype dt ) {
        if( this == dt )
            return this;

        GenericIntervalList result = new GenericIntervalList( valueSpace );
        if( dt instanceof BaseXSDAtomicType ) {
            BaseXSDAtomicType other = (BaseXSDAtomicType) dt;

            result.addIntervalList( values );
            result.addIntervalList( other.values );
        }

        return create( result );
    }
View Full Code Here

    public AtomicDatatype difference( AtomicDatatype dt ) {
        if( this == dt )
            return EmptyDatatype.instance;

        GenericIntervalList result = new GenericIntervalList( valueSpace );
        if( dt instanceof BaseXSDAtomicType ) {
            BaseXSDAtomicType other = (BaseXSDAtomicType) dt;

            result.addIntervalList( values );
            result.removeIntervalList( other.values );
        }

        return create( result );
    }
View Full Code Here

        return create( result );
    }

    public AtomicDatatype enumeration( Set enum_ ) {
        GenericIntervalList result = new GenericIntervalList( valueSpace );
        for( Iterator i = enum_.iterator(); i.hasNext(); ) {
            Number number = (Number) i.next();
            result.addInterval( number, number );
        }

        return create( result );
    }
View Full Code Here

        return create( result );
    }

    public Datatype singleton( Object value ) {
        GenericIntervalList result = new GenericIntervalList( valueSpace );
        result.addInterval( value, value );

        return create( result );
    }
View Full Code Here

            }
            else
                return this;
           
            // create an interval from the min max values
            GenericIntervalList intervalList = new GenericIntervalList( values );
            // intersect the current interval list with this restriction
            intervalList.restrictToInterval( start, incStart, end, incEnd );
            // derive the new type
            return create( intervalList );
        } catch (Exception e) {
            e.printStackTrace();
            throw new UnsupportedOperationException("Value " + value + " is not valid for the facet " + facet);
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.utils.GenericIntervalList$Interval

Copyright © 2018 www.massapicom. 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.