Package it.unimi.dsi.mg4j.search

Examples of it.unimi.dsi.mg4j.search.OrDocumentIterator.nextDocument()


        } );
    OrDocumentIterator orDocumentIterator = (OrDocumentIterator)OrDocumentIterator.getInstance( i0, i1 );
    assertTrue( orDocumentIterator.hasNext() );
    assertTrue( orDocumentIterator.hasNext() ); // To increase coverage
   
    assertEquals( 0, orDocumentIterator.nextDocument() );
    assertTrue( orDocumentIterator.intervalIterator().hasNext() );
    assertTrue( orDocumentIterator.intervalIterator().hasNext() ); // To increase coverage
    assertEquals( Interval.valueOf( 0, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() ); // To increase coverage
View Full Code Here


    assertTrue( orDocumentIterator.intervalIterator().hasNext() ); // To increase coverage
    assertEquals( Interval.valueOf( 0, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() ); // To increase coverage
   
    assertEquals( 1, orDocumentIterator.nextDocument() );
    assertEquals( Interval.valueOf( 1, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );

    assertEquals( 2, orDocumentIterator.nextDocument() );
    assertEquals( Interval.valueOf( 0, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
View Full Code Here

   
    assertEquals( 1, orDocumentIterator.nextDocument() );
    assertEquals( Interval.valueOf( 1, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );

    assertEquals( 2, orDocumentIterator.nextDocument() );
    assertEquals( Interval.valueOf( 0, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 1, 2 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 3, 4 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );
View Full Code Here

    assertEquals( Interval.valueOf( 0, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 1, 2 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 3, 4 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );

    assertEquals( 3, orDocumentIterator.nextDocument() );
    assertEquals( Interval.valueOf( 0, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 1, 2 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );

    assertEquals( 4, orDocumentIterator.nextDocument() );
View Full Code Here

    assertEquals( 3, orDocumentIterator.nextDocument() );
    assertEquals( Interval.valueOf( 0, 1 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 1, 2 ), orDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orDocumentIterator.intervalIterator().hasNext() );

    assertEquals( 4, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );
   
    assertEquals( 5, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );
View Full Code Here

    assertFalse( orDocumentIterator.intervalIterator().hasNext() );

    assertEquals( 4, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );
   
    assertEquals( 5, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );

    assertEquals( 6, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );
   
View Full Code Here

    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );
   
    assertEquals( 5, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );

    assertEquals( 6, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );
   
    assertEquals( 7, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.FALSE, orDocumentIterator.intervalIterator() );
  }
View Full Code Here

    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );

    assertEquals( 6, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.TRUE, orDocumentIterator.intervalIterator() );
   
    assertEquals( 7, orDocumentIterator.nextDocument() );
    assertEquals( IntervalIterators.FALSE, orDocumentIterator.intervalIterator() );
  }
}
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.