ddc
|
#include <ConcCommon.h>
Classes | |
struct | CDataReference |
the structure holds a pointer to a vector of occurrences and its size More... | |
Public Member Functions | |
void | Clear () |
size_t | AddNewIndexItemNoToCache (const CTokenNo *pStart, const CTokenNo *pEnd) |
const CTokenNo * | GetOccurrencesFromCache (const int CacheId, DWORD &Length) const |
bool | CouldContainMore () const |
Private Attributes | |
vector< CDataReference > | m_IndexItemNo2Occurrences |
this map contains a relation from index item No to the address of its occurrences More... | |
vector< CTokenNo > | m_OccurrencesBody |
this vector contains all occurrences for this cache More... | |
CShortOccurCache is a structure which holds all found occurrences indexed by an index item No, if the number of occurrences for this index item is not greater than OccurBufferSize. This structure can take an advantage only if there are many corpus periods, otherwise it can even slow the program. But if there are many corpus periods, then having initialized this cache for the first period, the program can read from now on occurrences directly from the memory. CShortOccurCache is used only for one query at a time, so it is cleared in the very beginning of CConcHolder::GetAllHits.
void CShortOccurCache::Clear | ( | ) |
const CTokenNo * CShortOccurCache::GetOccurrencesFromCache | ( | const int | CacheId, |
DWORD & | Length | ||
) | const |
References CShortOccurCache::CDataReference::m_VectorLength, and CShortOccurCache::CDataReference::m_VectorStartOffset.
Referenced by CIndexSetForQueryingStage::AddOccurs().
bool CShortOccurCache::CouldContainMore | ( | ) | const |
References MaxShortOccurCacheSize.
Referenced by CIndexSetForQueryingStage::AddOccurs().
|
private |
this map contains a relation from index item No to the address of its occurrences
|
private |
this vector contains all occurrences for this cache