CItemIndexForLoading holds all occurrences of one index item (token, morph. pattern...) on the index stage. More...
#include <IndexSetForLoadingStage.h>
CItemIndexForLoading holds all occurrences of one index item (token, morph. pattern...) on the index stage.
There are only two members: m_pCurrOccurs and m_IndexItemOffset. Member m_pCurrOccurs is a pointer to the vector of occurrences of an indexed string. We use here pointers because we are going to create vector<CItemIndexForLoading>, and pointers can help us to avoid copying all occurrences each time when an item is inserted to vector<CItemIndexForLoading>. Member m_IndexItemOffset is an reference to CIndexSetForLoadingStage::m_StringBuffer
size_t CItemIndexForLoading::GetIndexItemOffset | ( | ) | const [inline] |
gets the reference to the index item
References m_IndexItemOffset.
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), and CIndexSetForQueryingStage::AddOneIndexItem().
void CItemIndexForLoading::SetIndexItemOffset | ( | size_t | Value | ) | [inline] |
sets the reference to the index item
References m_IndexItemOffset.
Referenced by CIndexSetForLoadingStage::InsertToInputLoadIndex(), and CStringIndexSet::UnionIndexSet().
vector<CTokenNo>* CItemIndexForLoading::GetOccurs | ( | ) | [inline] |
gets vector of occurrences
References m_pCurrOccurs.
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CIndexSetForQueryingStage::AddOneIndexItem(), CIndexSetForLoadingStage::InsertToInputLoadIndex(), CIndexSetForLoadingStage::SortInputAndMemoryIndices(), CStringIndexSet::UnionIndexSet(), and CIndexSetForBigrams::WriteBigramAndItsOccurs().
const vector<CTokenNo>* CItemIndexForLoading::GetOccurs | ( | ) | const [inline] |
gets vector of occurrences (const)
References m_pCurrOccurs.
size_t CItemIndexForLoading::GetOccursSize | ( | ) | const [inline] |
References m_pCurrOccurs.
Referenced by CIndexSetForQueryingStage::AddOneIndexItem(), CStringIndexSet::UnionIndexSet(), and CIndexSetForBigrams::WriteBigramAndItsOccurs().
bool CItemIndexForLoading::InitOccurs | ( | ) |
initializes vector of occurrences
References m_pCurrOccurs.
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CStringIndexSet::ConvertLoadIndexToWorkingIndex(), CIndexSetForLoadingStage::InsertToInputLoadIndex(), and CStringIndexSet::UnionIndexSet().
void CItemIndexForLoading::FreeOccurs | ( | ) |
deletes vector of occurrences
References m_pCurrOccurs.
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), CStringIndexSet::ConvertLoadIndexToWorkingIndex(), and CStringIndexSet::UnionIndexSet().
bool CItemIndexForLoading::WriteOccurrences | ( | FILE * | fp | ) | const |
writes vector of occurrences to a file
References m_pCurrOccurs, and WriteVectorInner().
Referenced by CIndexSetForQueryingStage::AddOneIndexItem(), and CIndexSetForBigrams::WriteBigramAndItsOccurs().
bool CItemIndexForLoading::CheckOccurrences | ( | CTokenNo | EndTokenNo | ) | const |
checks the order of occurrences
References m_pCurrOccurs.
Referenced by CIndexSetForQueryingStage::AddOneIndexItem().
void CItemIndexForLoading::ClearOccurrences | ( | ) |
clears vector of occurrences to a file
References ClearVector(), and m_pCurrOccurs.
Referenced by CIndexSetForBigrams::WriteBigramAndItsOccurs().
bool CItemIndexForLoading::ReadFromTemporalFile | ( | FILE * | fp | ) |
read vector of occurrences from a temporal file
References FTell(), m_IndexItemOffset, m_pCurrOccurs, and ReadVectorInner().
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex(), and CStringIndexSet::ConvertLoadIndexToWorkingIndex().
void CItemIndexForLoading::WriteToTemporalFile | ( | FILE * | fp | ) | const |
write vector of occurrences to a temporal file
References m_IndexItemOffset, m_pCurrOccurs, and WriteVectorInner().
Referenced by CIndexSetForLoadingStage::AddMemoryLoadIndexToMainLoadIndex().
vector< CTokenNo >* CItemIndexForLoading::m_pCurrOccurs [private] |
current vector of occurrences
Referenced by CheckOccurrences(), ClearOccurrences(), FreeOccurs(), GetOccurs(), GetOccursSize(), InitOccurs(), ReadFromTemporalFile(), WriteOccurrences(), and WriteToTemporalFile().
size_t CItemIndexForLoading::m_IndexItemOffset [private] |
a reference to CStringIndexSet::m_StringBuffer
Referenced by GetIndexItemOffset(), ReadFromTemporalFile(), SetIndexItemOffset(), and WriteToTemporalFile().