DocMap

abstract class DocMap

A permutation of doc IDs. For every document ID between 0 and , oldToNew(newToOld(docID)) must return docID.

Functions

Link copied to clipboard
abstract fun newToOld(docID: Int): Int

Given the ordinal of a doc ID, return its doc ID in the original index.

Link copied to clipboard
abstract fun oldToNew(docID: Int): Int

Given a doc ID from the original index, return its ordinal in the sorted index.

Link copied to clipboard
abstract fun size(): Int

Return the number of documents in this map. This must be equal to the of the [ ] which is sorted.