Examples of document()


Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

    i2.reset();

    consecutiveDocumentIterator = ConsecutiveDocumentIterator.getInstance( new DocumentIterator[] { i0, i1, i2 }, new int[] { 1, 0, 0 } );
    assertTrue( consecutiveDocumentIterator.hasNext() );
    assertEquals( 0, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 0, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 2, 5 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 3, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 3, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 3, 6 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

    assertEquals( 0, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 0, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 2, 5 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 3, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 3, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 3, 6 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertFalse( consecutiveDocumentIterator.hasNext() );
  }
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

        { 5 }
        } );
    DocumentIterator orderedAndDocumentIterator = OrderedAndDocumentIterator.getInstance( i0, i1, i2 );
    assertTrue( orderedAndDocumentIterator.hasNext() );
    assertEquals( 0, orderedAndDocumentIterator.nextDocument() );
    assertEquals( 0, orderedAndDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 2 ), orderedAndDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orderedAndDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 1, orderedAndDocumentIterator.nextDocument() );
    assertEquals( 1, orderedAndDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 2 ), orderedAndDocumentIterator.intervalIterator().nextInterval() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

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

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

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

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

    assertEquals( 3, orderedAndDocumentIterator.document() );
    assertEquals( Interval.valueOf( 1, 4 ), orderedAndDocumentIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 2, 8 ), orderedAndDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orderedAndDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 4, orderedAndDocumentIterator.nextDocument() );
    assertEquals( 4, orderedAndDocumentIterator.document() );
    assertEquals( Interval.valueOf( 2, 4 ), orderedAndDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orderedAndDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 5, orderedAndDocumentIterator.nextDocument() );
    assertEquals( 5, orderedAndDocumentIterator.document() );
    assertEquals( Interval.valueOf( 1, 5 ), orderedAndDocumentIterator.intervalIterator().nextInterval() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

    assertEquals( 4, orderedAndDocumentIterator.nextDocument() );
    assertEquals( 4, orderedAndDocumentIterator.document() );
    assertEquals( Interval.valueOf( 2, 4 ), orderedAndDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orderedAndDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 5, orderedAndDocumentIterator.nextDocument() );
    assertEquals( 5, orderedAndDocumentIterator.document() );
    assertEquals( Interval.valueOf( 1, 5 ), orderedAndDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( orderedAndDocumentIterator.intervalIterator().hasNext() );
    assertFalse( orderedAndDocumentIterator.hasNext() );
  }
}
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

        } );
    DocumentIterator differenceIterator = DifferenceDocumentIterator.getInstance( minuendIterator, subtrahendIterator );
    assertTrue( differenceIterator.hasNext() );
    assertTrue( differenceIterator.hasNext() ); // To increase coverage
    assertEquals( 0, differenceIterator.nextDocument() );
    assertEquals( 0, differenceIterator.document() );
    assertEquals( Interval.valueOf( 0, 1 ), differenceIterator.intervalIterator().nextInterval() );
    assertFalse( differenceIterator.intervalIterator().hasNext() );
    assertEquals( 1, differenceIterator.nextDocument() );
    assertEquals( 1, differenceIterator.document() );
    assertEquals( Interval.valueOf( 2, 3 ), differenceIterator.intervalIterator().nextInterval() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

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

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.document()

    assertEquals( 1, differenceIterator.nextDocument() );
    assertEquals( 1, differenceIterator.document() );
    assertEquals( Interval.valueOf( 2, 3 ), differenceIterator.intervalIterator().nextInterval() );
    assertFalse( differenceIterator.intervalIterator().hasNext() );
    assertEquals( 2, differenceIterator.nextDocument() );
    assertEquals( 2, differenceIterator.document() );
    assertEquals( Interval.valueOf( 0, 1 ), differenceIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 1, 2 ), differenceIterator.intervalIterator().nextInterval() );
    assertEquals( Interval.valueOf( 2, 3 ), differenceIterator.intervalIterator().nextInterval() );
    assertFalse( differenceIterator.intervalIterator().hasNext() );
    assertEquals( 3, differenceIterator.nextDocument() );
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.