Package it.unimi.dsi.logging

Examples of it.unimi.dsi.logging.ProgressLogger.update()


      frequencies.writeGamma( totalFrequency );
      numPointers += totalFrequency;

      /* A trick to get a correct prediction. */
      if ( writeGlobCounts ) pl.count += totalGlobCount - 1;
      pl.update();
    }
    pl.done();
   
    if ( writeGlobCounts ) outputGlobCounts.close();
    termFile.close();
View Full Code Here


    while( terms.readLine( currTerm ) != null ) {
      k = strategy.localIndex( termNumber ); // The local index for this term
      if ( numTerms[ k ] != strategy.localNumber( termNumber ) ) throw new IllegalStateException();
      numTerms[ k ]++;
      currTerm.println( localTerms[ k ] );
      pl.update();
      termNumber++;
    }

    terms.close();
    for( int i = 0; i < numIndices; i++ ) localTerms[ i ].close();
View Full Code Here

        globalIndex.read( buffer, res );
        localIndexStream[ k ].write( buffer, res );
        length -= res;
      }
     
      pl.update();
      prevK = k;
      termNumber++;
    }

    // We pour the last piece of positions
View Full Code Here

      }
      if ( building ) builder.endDocument();
      documentPointer++;
      documentsInBatch++;
      document.close();
      pl.update();

      // We try compaction if we detect less than PERC_AVAILABLE_MEMORY_CHECK memory available
      long percAvailableMemory = Util.percAvailableMemory();
      boolean compacted = false;
      if ( ! outOfMemoryError && percAvailableMemory < PERC_AVAILABLE_MEMORY_CHECK ) {
View Full Code Here

            coveredForQuery[ q ]++;
            if ( coveredForQuery[ q ] == docperquery ) numberOfPartialQueries--;
          }
      }
      lineNumber++;
      if ( lineNumber % 1000 == 0 ) pl.update();
    }
    pl.done();

    MutableString p[] = new MutableString[ Math.max( queries, wordsperdoc ) ], s = new MutableString();
    for( i = 0; i < p.length; i++ ) p[ i ] = new MutableString();
View Full Code Here

        localFrequency[ i ] = 0;
      }
     
      usedIndices = 0;
      pl.count += frequency - 1;
      pl.update();
    }

    pl.done();

    Properties globalProperties = new Properties();
View Full Code Here

          pl.expectedUpdates = numberOfTerms[ i ];
          pl.start( "Verifying sequentially index " + index[ i ] + "..." );

          if ( allBitStreamIndices ) {
            for ( t = 0; t < numberOfTerms[ i ]; t++ ) {
              pl.update();
              IndexIterator indexIterator = indexReader[ i ].nextIterator();
              indexFrequency = indexIterator.frequency();
              numberOfPostings += indexFrequency;
              if ( frequencies[ i ] != null && indexFrequency != ( f = frequencies[ i ].readGamma() ) ) {
                System.err.println( "Error in frequency for term " + t + ": expected " + f + " documents, found " + indexFrequency );
View Full Code Here

                  System.err.println( "Document " + p + " has size " + ( (BitStreamIndex) index[ i ] ).sizes.getInt( p ) + " but " + count[ i ][ p ] + " occurrences have been stored." );
           
          }
          else { // Non-bitstream indices
            for (t = 0; t < numberOfTerms[ i ]; t++) {
              pl.update();
              IndexIterator indexIterator = termLists ? indexReader[ i ].documents( terms[ i ].get( t ) ) : indexReader[ i ].documents( t );
              indexFrequency = indexIterator.frequency();
              numberOfPostings += indexFrequency;
              if (frequencies[i] != null && indexFrequency != (f = frequencies[i].readGamma())) {
                System.err.println("Error in frequency for term " + t
View Full Code Here

              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() + ")" );
             
             
            }
            pl.update();
          }
          pl.done();
        }
      }
      catch( Throwable e  ) {
View Full Code Here

              it = s2.iterator();
              documentIterator = OrDocumentIterator.getInstance( indexIterator, additionalIterator );
              for( int j = s2.size(); j-- != 0; ) if ( it.nextInt() != documentIterator.nextDocument() ) throw new AssertionError();
              if ( documentIterator.hasNext() ) throw new AssertionError();
           
            pl.update();
          }
          pl.done();
          additionalReader.close();
        }
      }
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.