Examples of Interval


Examples of com.vividsolutions.jts.index.bintree.Interval

  public List query(Interval searchInterval)
  {
    List result = new ArrayList();
    for (Iterator i = list.iterator(); i.hasNext(); ) {
      Interval interval = (Interval) i.next();
      if (interval.overlaps(searchInterval))
        result.add(interval);
    }
    return result;
  }
View Full Code Here

Examples of com.vividsolutions.jts.index.strtree.Interval

    String[] testCaseName = {IntervalTest.class.getName()};
    junit.textui.TestRunner.main(testCaseName);
  }

  public void testIntersectsBasic() {
    assertTrue(new Interval(5, 10).intersects(new Interval(7, 12)));
    assertTrue(new Interval(7, 12).intersects(new Interval(5, 10)));
    assertTrue(! new Interval(5, 10).intersects(new Interval(11, 12)));
    assertTrue(! new Interval(11, 12).intersects(new Interval(5, 10)));
    assertTrue(new Interval(5, 10).intersects(new Interval(10, 12)));
    assertTrue(new Interval(10, 12).intersects(new Interval(5, 10)));
  }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.Interval

   * @param unit the unit to determine the left neighbor for
   * @param dim the dimension
   * @return the left neighbor of the given unit in the specified dimension
   */
  public CLIQUEUnit<V> leftNeighbor(CLIQUEUnit<V> unit, Integer dim) {
    Interval i = unit.getInterval(dim);

    for(CLIQUEUnit<V> u : getDenseUnits()) {
      if(u.containsLeftNeighbor(i)) {
        return u;
      }
View Full Code Here

Examples of edu.stanford.nlp.sempre.paraphrase.Interval

    private int end;
    private int lastItemMatched=0;

    public LangExpMatch(int start, int end) {
      itemMap = new ArrayList<Interval>();
      itemMap.add(new Interval(start,end));
      this.end = end;
    }
View Full Code Here

Examples of eu.admire.gridminer.datapreprocessing.statistic.Interval

                {
                    int intervalCount = intervalsPMML.length;
                    intervals[i] = new Interval[intervalCount];
                    for (int j = 0; j < intervalCount; j++)
                    {
                        intervals[i][j] = new Interval();
                        // init ContStats value
                        double number = intervalsPMML[j].getLeftMargin();
                        intervals[i][j].setLeftMargin(number);
                        number = intervalsPMML[j].getRightMargin();
                        intervals[i][j].setRightMargin(number);
View Full Code Here

Examples of fr.soleil.lib.flyscan.model.parsing.configuration.trajectory.Interval

            @Override
            public void actionPerformed(EventObject arg0) {
                // super.mouseClicked(e);

                Interval interval = new Interval(0, 0, 0);
                AIntervalTrajectoryComponent.this.intervals.add(interval);

                removeButton.setEnabled(isEnabled() && AIntervalTrajectoryComponent.this.intervals.size() > 1);

                addNewInterval(interval, intervalsPanel);
View Full Code Here

Examples of htsjdk.samtools.util.Interval

                                                  String contig, int intervalStart, int intervalEnd ) throws Exception {

        SAMFileHeader picardFileHeader = new SAMFileHeader();
        picardFileHeader.addSequence(genomeLocParser.getContigInfo("chr1"));
        IntervalList picardIntervals = new IntervalList(picardFileHeader);
        picardIntervals.add(new Interval(contig, intervalStart, intervalEnd, true, "dummyname"));

        File picardIntervalFile = createTempFile("testInvalidPicardIntervalHandling", ".intervals");
        picardIntervals.write(picardIntervalFile);

        List<IntervalBinding<Feature>> intervalArgs = new ArrayList<IntervalBinding<Feature>>(1);
View Full Code Here

Examples of it.unimi.dsi.util.Interval

   * provided their number does not exceed the given limit and that this index has a {@link #prefixMap}.
   */
 
  public IndexIterator documents( final CharSequence prefix, final int limit ) throws IOException, TooManyTermsException {
    if ( prefixMap != null ) {
      final Interval interval = prefixMap.rangeMap().get( prefix );
      if ( interval == Intervals.EMPTY_INTERVAL ) return new Index.EmptyIndexIterator();
      final IndexIterator result;
     
      if ( interval.length() > limit ) throw new TooManyTermsException( interval.length() );
     
      if ( interval.length() == 1 ) result = documents( interval.left );
      else {
        IndexIterator[] baseIterator = new IndexIterator[ interval.length()];
        int k = 0;
        for( IntIterator i = interval.iterator(); i.hasNext(); ) baseIterator[ k++ ] = documents( i.nextInt() );
     
        result = MultiTermIndexIterator.getInstance( this, baseIterator );
      }
      result.term( prefix + "*" );
      return result;
View Full Code Here

Examples of it.unimi.dsi.util.Interval

      final int[] actualGap = this.actualGap;
      final IntervalIterator[] intervalIterator = this.intervalIterator;
     
      if ( DEBUG ) System.err.println( java.util.Arrays.asList( curr ) );
      int k = 0;
      Interval interval;

      while( k < m ) {
        for ( k = 1; k < m; k++ ) {
          while ( curr[ k ].left < curr[ k - 1 ].right + actualGap[ k ] )
            if ( ( curr[ k ] = intervalIterator[ k ].nextInterval() ) == null ) {
View Full Code Here

Examples of it.unimi.dsi.util.Interval

      return Interval.valueOf( curr[ 0 ].left - actualGap[ 0 ], curr[ m - 1 ].right );
    }
   
    public Interval nextInterval() throws IOException {
      if ( next != null ) {
        final Interval result = next;
        next = null;
        return result;
      }

      if ( endOfProcess ) return null;
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.