ddc
Public Member Functions | Public Attributes | List of all members
CQTokenOccurrenceIterator Struct Reference

CQTokenOccurrenceIterator (formerly CQNearEvalItem) is used to iterate over query occurrences;. More...

#include <QueryNode.h>

Inheritance diagram for CQTokenOccurrenceIterator:
Inheritance graph
[legend]
Collaboration diagram for CQTokenOccurrenceIterator:
Collaboration graph
[legend]

Public Member Functions

 CQTokenOccurrenceIterator (CQueryNode *node_=NULL)
 
 CQTokenOccurrenceIterator (const CQTokenOccurrenceIterator &b)
 
virtual ~CQTokenOccurrenceIterator ()
 
void bind (CQueryTokenNode *node_, const CQTokenOccurrenceIterator &src, int minOffset, int maxOffset)
 
CQTokenOccurrenceIteratoroperator= (const CQTokenOccurrenceIterator &b)
 
void assign (CQueryNode *node_)
 
CQTokenOccurrenceIteratoroperator= (CQueryTokenNode *node_)
 
size_t chunksize () const
 
CTokenNo tmin () const
 
CTokenNo tmax () const
 
void operator++ ()
 
void seek (const CTokenNo Tok)
 
bool operator== (const CQTokenOccurrenceIterator &b) const
 
- Public Member Functions inherited from CQOccurrenceIterator
 CQOccurrenceIterator (CQueryNode *node_=NULL)
 
 CQOccurrenceIterator (const CQOccurrenceIterator &b)
 
virtual ~CQOccurrenceIterator ()
 
void bind (CQueryTokenNode *node_, const CQOccurrenceIterator &src, int minOffset, int maxOffset)
 
CQOccurrenceIteratoroperator= (const CQOccurrenceIterator &b)
 
void assign (CQueryNode *node_)
 
CQOccurrenceIteratoroperator= (CQueryNode *node_)
 
bool valid () const
 
void invalidate ()
 
 operator bool () const
 
size_t chunksize () const
 
CTokenNo tocc (DWORD occ) const
 
CTokenNo tmin () const
 
CTokenNo tmax () const
 
CTokenNo tmax_prev () const
 
void operator++ ()
 
void seek (const CTokenNo Tok)
 
bool operator== (const CQOccurrenceIterator &b) const
 

Public Attributes

DWORD stride
 average number of tokens between occurrences in node More...
 
- Public Attributes inherited from CQOccurrenceIterator
CQueryNodenode
 (sub)query node More...
 
int cnt
 limit for node->m_Occurrences[] More...
 
int cur
 index into node->m_Occurrences[] More...
 
DWORD chpos
 index into node->m_ChunkLengths[] (match occurrence) More...
 

Detailed Description

CQTokenOccurrenceIterator (formerly CQNearEvalItem) is used to iterate over query occurrences;.

Constructor & Destructor Documentation

◆ CQTokenOccurrenceIterator() [1/2]

CQTokenOccurrenceIterator::CQTokenOccurrenceIterator ( CQueryNode node_ = NULL)
inline

default constructor

◆ CQTokenOccurrenceIterator() [2/2]

CQTokenOccurrenceIterator::CQTokenOccurrenceIterator ( const CQTokenOccurrenceIterator b)
inline

copy constructor

◆ ~CQTokenOccurrenceIterator()

virtual CQTokenOccurrenceIterator::~CQTokenOccurrenceIterator ( )
inlinevirtual

Member Function Documentation

◆ bind()

void CQTokenOccurrenceIterator::bind ( CQueryTokenNode node_,
const CQTokenOccurrenceIterator src,
int  minOffset,
int  maxOffset 
)

Create an iterator bound to the neighbors of src, used to avoid expensive EvaluateWithoutHits() for universal sub-queries as near() arguments. Destructively alters node_->m_Occurrences[] (and associated vectors). Generates a "bound" occurence in node_->m_Occurrences[] for each source-occurence occi = src.node->m_Occurrences[i] and each offset off with minOffset <= off <= maxOffset representing token *occi + off, modulo off==0.

Parameters
node_universal wildcard node in which to create bound occurrences.
srcsource iterator to use for occurrence generation (should already have been populated by EvaluateWithoutHits())
minOffsetminimum offset for bound occurrences wrt source-occurrence
maxOffsetmaximum offset for bound occurrences wrt source-occurrence (inclusive)

References CQOccurrenceIterator::cnt, CQueryTokenNode::m_bAny, CQueryTokenNode::m_MatchId, CQueryTokenNode::m_NodeIndex, CQueryNode::m_Occurrences, and CQOccurrenceIterator::node.

◆ operator=() [1/2]

CQTokenOccurrenceIterator& CQTokenOccurrenceIterator::operator= ( const CQTokenOccurrenceIterator b)
inline

assignment operator

References CQOccurrenceIterator::operator=(), and stride.

Here is the call graph for this function:

◆ assign()

void CQTokenOccurrenceIterator::assign ( CQueryNode node_)
inline

node-assignment : inherited

References CQOccurrenceIterator::assign().

Here is the call graph for this function:

◆ operator=() [2/2]

CQTokenOccurrenceIterator& CQTokenOccurrenceIterator::operator= ( CQueryTokenNode node_)
inline

◆ chunksize()

size_t CQTokenOccurrenceIterator::chunksize ( ) const
inline

get size of current occurrence-chunk: override

◆ tmin()

CTokenNo CQTokenOccurrenceIterator::tmin ( ) const
inline

Referenced by CQueryWithNode::EvaluateWithoutHits().

Here is the caller graph for this function:

◆ tmax()

CTokenNo CQTokenOccurrenceIterator::tmax ( ) const
inline

◆ operator++()

void CQTokenOccurrenceIterator::operator++ ( )
inline

◆ seek()

void CQTokenOccurrenceIterator::seek ( const CTokenNo  Tok)
inline

References DDC_OCCITER_LB_COEF, and log2u32().

Referenced by CQueryWithNode::EvaluateWithoutHits().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator==()

bool CQTokenOccurrenceIterator::operator== ( const CQTokenOccurrenceIterator b) const
inline

References CQOccurrenceIterator::cur, GetWordForms(), CQueryNode::m_Occurrences, and CQOccurrenceIterator::node.

Here is the call graph for this function:

Member Data Documentation

◆ stride

DWORD CQTokenOccurrenceIterator::stride

average number of tokens between occurrences in node

Referenced by operator=().


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