Examples of Document()


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

    i1.reset();
    i2.reset();

    consecutiveDocumentIterator = ConsecutiveDocumentIterator.getInstance( i0, i1, i2 );
    assertEquals( 2, consecutiveDocumentIterator.skipTo( 2 ) );
    assertEquals( 2, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 2 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 3, consecutiveDocumentIterator.nextDocument() );
    assertFalse( consecutiveDocumentIterator.hasNext() );
View Full Code Here

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

    i2.reset();

    consecutiveDocumentIterator = ConsecutiveDocumentIterator.getInstance( new DocumentIterator[] { i0, i1, i2 }, new int[] { 1, 1, 1 } );
    assertTrue( consecutiveDocumentIterator.hasNext() );
    assertEquals( 0, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 0, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 2 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 1, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 1, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 5 ), 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( 0, 2 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 1, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 1, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 5 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 2, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 2, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 2 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
View Full Code Here

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

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

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

        { { 4, 5 } },
        } );
    DocumentIterator consecutiveDocumentIterator = ConsecutiveDocumentIterator.getInstance( i0, i1, i2 );
    assertTrue( consecutiveDocumentIterator.hasNext() );
    assertEquals( 0, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 0, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 5 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertNull( consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.hasNext() );
   
View Full Code Here

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

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

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

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

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

    assertEquals( 2, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 2, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 2 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 3, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 3, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 4, 6 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertFalse( consecutiveDocumentIterator.hasNext() );

   
View Full Code Here

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

    i1.reset();
    i2.reset();

    consecutiveDocumentIterator = ConsecutiveDocumentIterator.getInstance( i0, i1, i2 );
    assertEquals( 2, consecutiveDocumentIterator.skipTo( 1 ) );
    assertEquals( 2, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 2 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 3, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 3, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 4, 6 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
View Full Code Here

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

    assertEquals( 2, consecutiveDocumentIterator.skipTo( 1 ) );
    assertEquals( 2, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 0, 2 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertEquals( 3, consecutiveDocumentIterator.nextDocument() );
    assertEquals( 3, consecutiveDocumentIterator.document() );
    assertEquals( Interval.valueOf( 4, 6 ), consecutiveDocumentIterator.intervalIterator().nextInterval() );
    assertFalse( consecutiveDocumentIterator.intervalIterator().hasNext() );
    assertFalse( consecutiveDocumentIterator.hasNext() );

    i0.reset();
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.