Class ArrayOfBasicIterablePosting

    • Field Detail

      • frequencies

        protected int[] frequencies
        frequencies of all of the stored postings
      • doclens

        protected int[] doclens
    • Constructor Detail

      • ArrayOfBasicIterablePosting

        public ArrayOfBasicIterablePosting​(int[] _ids,
                                           int[] _freqs)
        Make a new posting list with these ids and frequencies
      • ArrayOfBasicIterablePosting

        public ArrayOfBasicIterablePosting​(int[] _ids,
                                           int[] _freqs,
                                           int[] _lens)
    • Method Detail

      • getFrequency

        public int getFrequency()
        Return the frequency of the term in the current document, in tokens.
        Specified by:
        getFrequency in interface Posting
        Overrides:
        getFrequency in class ArrayOfIdsIterablePosting
        Returns:
        frequency of the term in the current document, in tokens.
      • getDocumentLength

        public int getDocumentLength()
        Description copied from class: ArrayOfIdsIterablePosting
        Return the length of the document of the current posting in tokens. Usually uses the DocumentIndex, may do otherwise if document length statistics are in posting list. Returns 0.
        Specified by:
        getDocumentLength in interface Posting
        Overrides:
        getDocumentLength in class ArrayOfIdsIterablePosting
        Returns:
        length of the document of the current posting in tokens.