ddc
Classes | Public Member Functions | Private Attributes | List of all members
CShortOccurCache Class Reference

#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 CTokenNoGetOccurrencesFromCache (const int CacheId, DWORD &Length) const
 
bool CouldContainMore () const
 

Private Attributes

vector< CDataReferencem_IndexItemNo2Occurrences
 this map contains a relation from index item No to the address of its occurrences More...
 
vector< CTokenNom_OccurrencesBody
 this vector contains all occurrences for this cache More...
 

Detailed Description

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.

Member Function Documentation

◆ Clear()

void CShortOccurCache::Clear ( )

References ClearContainer().

Here is the call graph for this function:

◆ AddNewIndexItemNoToCache()

size_t CShortOccurCache::AddNewIndexItemNoToCache ( const CTokenNo pStart,
const CTokenNo pEnd 
)

Referenced by CIndexSetForQueryingStage::AddOccurs().

Here is the caller graph for this function:

◆ GetOccurrencesFromCache()

const CTokenNo * CShortOccurCache::GetOccurrencesFromCache ( const int  CacheId,
DWORD Length 
) const

◆ CouldContainMore()

bool CShortOccurCache::CouldContainMore ( ) const

References MaxShortOccurCacheSize.

Referenced by CIndexSetForQueryingStage::AddOccurs().

Here is the caller graph for this function:

Member Data Documentation

◆ m_IndexItemNo2Occurrences

vector<CDataReference> CShortOccurCache::m_IndexItemNo2Occurrences
private

this map contains a relation from index item No to the address of its occurrences

◆ m_OccurrencesBody

vector<CTokenNo> CShortOccurCache::m_OccurrencesBody
private

this vector contains all occurrences for this cache


The documentation for this class was generated from the following files: