Examples of document()


Examples of it.unimi.dsi.mg4j.index.IndexIterator.document()

              }
             
              IndexIterator indexIterator = termLists ? indexReader[ i ].documents( terms[ i ].get( t ) ) : indexReader[ i ].documents( t );
             
              result = indexIterator.skipTo( l.getInt( start ) );
              if ( indexIterator.document() != l.getInt( start ) || result != l.getInt( start ) ) throw new AssertionError("Trying to skip to document " + l.getInt( start ) + " (term " + t + ") moved to " + indexIterator.document() + "(skipTo() returned " + result + ")" );
              result = indexIterator.skipTo( Integer.MAX_VALUE );
              if ( indexIterator.hasNext() || result != Integer.MAX_VALUE ) throw new AssertionError("Trying to skip beyond end of list (term " + t + ") after a skip to " + start + " returned " + result + " (hasNext()=" + indexIterator.hasNext() + ")" );
             
             
            }
View Full Code Here

Examples of it.unimi.dsi.mg4j.index.IndexIterator.document()

              }
             
              IndexIterator indexIterator = termLists ? indexReader[ i ].documents( terms[ i ].get( t ) ) : indexReader[ i ].documents( t );
             
              result = indexIterator.skipTo( l.getInt( start ) );
              if ( indexIterator.document() != l.getInt( start ) || result != l.getInt( start ) ) throw new AssertionError("Trying to skip to document " + l.getInt( start ) + " (term " + t + ") moved to " + indexIterator.document() + "(skipTo() returned " + result + ")" );
              result = indexIterator.skipTo( Integer.MAX_VALUE );
              if ( indexIterator.hasNext() || result != Integer.MAX_VALUE ) throw new AssertionError("Trying to skip beyond end of list (term " + t + ") after a skip to " + start + " returned " + result + " (hasNext()=" + indexIterator.hasNext() + ")" );
             
             
            }
View Full Code Here

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

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

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

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

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

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

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

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

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

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

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