Examples of Interval


Examples of org.broad.igv.util.index.Interval

        IntervalTree iv = intervalTrees.get(lastChr);
        if (iv == null) {
            iv = new IntervalTree();
            intervalTrees.put(lastChr, iv);
        }
        iv.insert(new Interval(intervalStart, intervalEnd, value));
    }
View Full Code Here

Examples of org.drools.Interval

        KnowledgeBase kbase = loadKnowledgeBaseFromString( str );
        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

        DomainObject do1 = new DomainObject();
        do1.setId( 1 );
        do1.setInterval( new Interval( 10,
                                       5 ) );
        DomainObject do2 = new DomainObject();
        do2.setId( 1 );
        do2.setInterval( new Interval( 20,
                                       5 ) );
        ksession.insert( do1 );
        ksession.insert( do2 );

        org.drools.runtime.rule.QueryResults results = ksession.getQueryResults( "queryWithEval" );
View Full Code Here

Examples of org.drools.compiler.Interval

        KnowledgeBase kbase = SerializationHelper.serializeObject(loadKnowledgeBaseFromString(str));
        StatefulKnowledgeSession ksession = createKnowledgeSession( kbase );

        DomainObject do1 = new DomainObject();
        do1.setId( 1 );
        do1.setInterval( new Interval( 10,
                                       5 ) );
        DomainObject do2 = new DomainObject();
        do2.setId( 1 );
        do2.setInterval( new Interval( 20,
                                       5 ) );
        ksession.insert( do1 );
        ksession.insert( do2 );

        org.kie.api.runtime.rule.QueryResults results = ksession.getQueryResults( "queryWithEval" );
View Full Code Here

Examples of org.drools.core.time.Interval

        }

        @Override
        public Interval getInterval() {
            if ( this.getOperator().isNegated() ) {
                return new Interval( Interval.MIN,
                                     Interval.MAX );
            }
            return new Interval( 0,
                                 Interval.MAX );
        }
View Full Code Here

Examples of org.drools.time.Interval

            Interval[][] source = new Interval[size][];
            for ( int row = 0; row < size; row++ ) {
                source[row] = new Interval[size];
                for ( int col = 0; col < size; col++ ) {
                    if ( row == col ) {
                        source[row][col] = new Interval( 0,
                                                         0 );
                    } else {
                        source[row][col] = new Interval( Interval.MIN,
                                                         Interval.MAX );
                    }
                }
            }

            Interval[][] result;
            if ( size > 1 ) {
                List<Declaration> declarations = new ArrayList<Declaration>();
                int eventIndex = 0;
                // populate the matrix
                for ( Pattern event : events ) {
                    // references to other events are always backward references, so we can build the list as we go
                    declarations.add( event.getDeclaration() );
                    Map<Declaration, Interval> temporal = new HashMap<Declaration, Interval>();
                    gatherTemporalRelationships( event.getConstraints(),
                                                 temporal );
                    // intersect default values with the actual constrained intervals
                    for ( Map.Entry<Declaration, Interval> entry : temporal.entrySet() ) {
                        int targetIndex = declarations.indexOf( entry.getKey() );
                        Interval interval = entry.getValue();
                        source[targetIndex][eventIndex].intersect( interval );
                        Interval reverse = new Interval( interval.getUpperBound() == Long.MAX_VALUE ? Long.MIN_VALUE : -interval.getUpperBound(),
                                                         interval.getLowerBound() == Long.MIN_VALUE ? Long.MAX_VALUE : -interval.getLowerBound() );
                        source[eventIndex][targetIndex].intersect( reverse );
                    }
                    eventIndex++;
                }
View Full Code Here

Examples of org.eclipse.wb.draw2d.geometry.Interval

      // prepare row interval
      if (rowIntervals[row] == null) {
        Object trElement = dom.getParent(td);
        Rectangle trBounds = state.getAbsoluteBounds(trElement);
        container.absoluteToRelative(trBounds);
        Interval trInterval = new Interval(trBounds.y, trBounds.height);
        if (rowSpan == 1) {
          rowIntervals[row] = trInterval;
        } else {
          Rectangle tdBounds = state.getAbsoluteBounds(td);
          Interval spannedInterval = new Interval(trBounds.y, tdBounds.height);
          spannedRowIntervals.put(new Interval(row, rowSpan), spannedInterval);
        }
      }
      // prepare column interval
      if (columnIntervals[column] == null) {
        Rectangle tdBounds = state.getAbsoluteBounds(td);
        container.absoluteToRelative(tdBounds);
        Interval columnInterval = new Interval(tdBounds.x, tdBounds.width);
        if (colSpan == 1) {
          columnIntervals[column] = columnInterval;
        } else {
          spannedColumnIntervals.put(new Interval(column, colSpan), columnInterval);
        }
      }
      //Object widgetElement = dom.getElementById(Container_Info.getID(widget));
    }
    // fix spanned columns/rows
View Full Code Here

Examples of org.elasticsearch.common.joda.time.Interval

    }
    if (o instanceof String) {
      AdvancedQueryPojo.QueryTermPojo.TimeTermPojo time = new AdvancedQueryPojo.QueryTermPojo.TimeTermPojo();
      if (minNotMax) {
        time.min = (String) o;
        Interval i = QueryHandler.parseMinMaxDates(time, 0L, new Date().getTime(), false);
        return i.getStart().toDate();
      }
      else {
        time.max = (String) o;
        Interval i = QueryHandler.parseMinMaxDates(time, 0L, new Date().getTime(), false);
        return i.getEnd().toDate();       
      }
    }
    else {
      return null;
    }
View Full Code Here

Examples of org.gephi.attribute.time.Interval

        GraphModel graphModel = graphController.getGraphModel();
        AttributeModel attributeModel = graphController.getAttributeModel();

        double window = statistics.getWindow();
        double tick = statistics.getTick();
        Interval bounds = statistics.getBounds();
        if (bounds == null) {
            bounds = graphModel.getTimeBoundsVisible();
            statistics.setBounds(bounds);
        }

        if (dynamicLongTask != null) {
            //Count
            int c = (int) ((bounds.getHigh() - window - bounds.getLow()) / tick);
            dynamicLongTask.start(c);
        }

        //Init
        statistics.execute(graphModel, attributeModel);

        //Loop
        for (double low = bounds.getLow(); low <= bounds.getHigh() - window; low += tick) {
            double high = low + window;

//            Graph g = dynamicGraph.getSnapshotGraph(low, high);
           
           
            GraphView currentView = graphModel.getVisibleView();
            Graph graph = graphModel.getGraphVisible();
            GraphView view = graphModel.createView();
            Graph g = graphModel.getGraph(view);
           
            TimestampIndex<Node> nodeIndex = graphModel.getNodeTimestampIndex(currentView);
            for(Node node : nodeIndex.get(low, high)) {
                g.addNode(node);
            }
           
            TimestampIndex<Edge> edgeIndex = graphModel.getEdgeTimestampIndex(currentView);
            for(Edge edge : edgeIndex.get(low, high)) {
                g.addEdge(edge);
            }
           

            statistics.loop(g.getView(), new Interval(low, high));

            //Cancelled?
            if (dynamicLongTask != null && dynamicLongTask.isCancelled()) {
                return;
            } else if (dynamicLongTask != null) {
View Full Code Here

Examples of org.gephi.data.attributes.type.Interval

    @Test
    public void testCreateDynamicObjectMethods() {
        System.out.println("createDynamicObject(AttributeType, Interval)");
        AttributeType type = AttributeType.DYNAMIC_DOUBLE;
        Interval<Double> in = new Interval(1.0, 2.0, 3.0);
        DynamicType result = DynamicUtilities.createDynamicObject(type, in);
        DynamicType expResult = new DynamicDouble(new Interval<Double>(1.0, 2.0, 3.0));
        assertEquals(expResult, result);
        System.out.println("result:    " + result.toString());
        System.out.println("expResult: " + expResult.toString());
View Full Code Here

Examples of org.gephi.data.attributes.type.Interval

            if (value instanceof String && !column.getType().equals(AttributeType.DYNAMIC_STRING)) {
                //Value needs to be parsed
                value = TypeConvertor.getStaticType(column.getType()).parse((String) value);
            }
            //Wrap value in a dynamic type
            value = DynamicUtilities.createDynamicObject(column.getType(), new Interval(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, value));
        }
        attributeRow.setValue(column, value);
    }
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.