Package it.unimi.dsi.fastutil.longs

Examples of it.unimi.dsi.fastutil.longs.LongBigList


   * @return the term frequencies as an array which is parallel to the term
   *     ids
   * @throws java.io.IOException
   */
  public LongBigList getTermFrequency() throws IOException {
        LongBigList list = termfrequencies.get();
   
    if (list == null) {
      File frequenciesFile = new File(directory, String.format("%s-%s%s",
          basename, field, DiskBasedIndex.COUNTS_EXTENSION));
      LOGGER.info("Loading term frequencies from file " +
          frequenciesFile);
      list = new LongBigArrayBigList(index.numberOfTerms);

      final InputBitStream in = new InputBitStream(frequenciesFile);
      for (long i = 0; i < list.size64(); i++)
        list.set(i, in.readLongGamma());
      in.close();
      termfrequencies = new SoftReference<>(list);
     
      LOGGER.info("Completed.");
    }
View Full Code Here

TOP

Related Classes of it.unimi.dsi.fastutil.longs.LongBigList

Copyright © 2018 www.massapicom. 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.