Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

QueryNode Class Reference

#include <QueryNode.hpp>

Inheritance diagram for QueryNode:

BeliefNode ProxNode AndQnode BandNotQnode BandQnode CachedFrequencyBeliefNode ExtentRestrictionNode FilterNode FiltRejQnode FiltReqQnode ListBeliefNode MaxNode MaxQnode NotNode NotQnode NullScorerNode OrNode OrQnode PriorNode SkippingCapableNode SumNode SumQnode TermFrequencyBeliefNode WeightedSumNode WsumQnode OdnQNode PassageQNode SynQNode TermQnode UwnQNode List of all members.

Public Methods

 QueryNode (int id, double weight)
 New QueryNode with given id and weight.

 QueryNode ()
 New QueryNode with default id (0) and weight (1).

 QueryNode (double weight, double dWeight=0)
 New QueryNode with given weight and default id (0).

virtual ~QueryNode ()
 clean up internal data.

const QnListchildren () const
 the children of this node

void setChildren (QnList *cl)
 set the children of this node

int id () const
 the node's id

double weight () const
 the weight of this node.

void setWeight (double wt)
void setEntries (int cnt)
virtual void copyDocList (int len, int tf, const DocInfoList *dl, int dc)
 Copy the DocInfoList for a given node.

virtual void updateDocList (int numDocs)=0
 update doc list from children's doc lists.

virtual double eval (const DocumentRep *dRep) const=0
 evaluate the node on the given document, returning a score.

bool isProxNode () const
 Does this node have a proxList?

void startProxIteration () const
 Iteration through a node's prox lists.

bool hasMoreProx () const
 Any entries left in the list?

bool nextProxItem () const
 advance to next element in list. return false if empty.

bool nextProxItem (DOCID_T did) const

Public Attributes

int dCnt
 number of documents this node matched

bool * dList
 array of bool matched docs indexed by docid

DOCID_T nextDoc
 the next document this node matched.

ProxInfoproxList
 This node's ProxInfo list.


Protected Methods

void transformPassageOps ()
 flatten children of a node into weighted prox entries.

void unionDocList (int numDocs)
 Union the DocInfoLists of a given node.

void intersectDocList (int numDocs)
 Intersect the DocInfoLists of a given node.


Protected Attributes

QnListch
 This node's children list.

int entries
 Number of children in ch.

int it
 query node id

double w
 query node weight

double dw
 The default score.


Detailed Description

Base class for all structured query operators. A query node is assumed to have a list of children, an id, a weight (default 1) and an eval function which will be defined by its subclasses


Constructor & Destructor Documentation

QueryNode::QueryNode int    id,
double    weight
[inline]
 

New QueryNode with given id and weight.

QueryNode::QueryNode   [inline]
 

New QueryNode with default id (0) and weight (1).

QueryNode::QueryNode double    weight,
double    dWeight = 0
[inline]
 

New QueryNode with given weight and default id (0).

virtual QueryNode::~QueryNode   [inline, virtual]
 

clean up internal data.


Member Function Documentation

const QnList* QueryNode::children   const [inline]
 

the children of this node

virtual void QueryNode::copyDocList int    len,
int    tf,
const DocInfoList   dl,
int    dc
[inline, virtual]
 

Copy the DocInfoList for a given node.

Reimplemented in TermQnode.

virtual double QueryNode::eval const DocumentRep   dRep const [pure virtual]
 

evaluate the node on the given document, returning a score.

Implemented in ProxNode, SumQnode, WsumQnode, AndQnode, OrQnode, NotQnode, MaxQnode, BandQnode, BandNotQnode, FiltRejQnode, FiltReqQnode, TermQnode, and PassageQNode.

bool QueryNode::hasMoreProx   const [inline]
 

Any entries left in the list?

int QueryNode::id   const [inline]
 

the node's id

void QueryNode::intersectDocList int    numDocs [protected]
 

Intersect the DocInfoLists of a given node.

bool QueryNode::isProxNode   const [inline]
 

Does this node have a proxList?

bool QueryNode::nextProxItem DOCID_T    did const [inline]
 

advance to element with id did, or to next element beyond if did is not found. Return true if found, false if not.

bool QueryNode::nextProxItem   const [inline]
 

advance to next element in list. return false if empty.

void QueryNode::setChildren QnList   cl [inline]
 

set the children of this node

void QueryNode::setEntries int    cnt [inline]
 

void QueryNode::setWeight double    wt [inline]
 

void QueryNode::startProxIteration   const [inline]
 

Iteration through a node's prox lists.

void QueryNode::transformPassageOps   [protected]
 

flatten children of a node into weighted prox entries.

flatten children of a node into weighted proximity entries. removes all belief operators.

void QueryNode::unionDocList int    numDocs [protected]
 

Union the DocInfoLists of a given node.

virtual void QueryNode::updateDocList int    numDocs [pure virtual]
 

update doc list from children's doc lists.

Implemented in BeliefNode, ProxNode, BandQnode, FiltReqQnode, OdnQNode, UwnQNode, PassageQNode, and SynQNode.

double QueryNode::weight   const [inline]
 

the weight of this node.


Member Data Documentation

QnList* QueryNode::ch [protected]
 

This node's children list.

int QueryNode::dCnt
 

number of documents this node matched

bool* QueryNode::dList
 

array of bool matched docs indexed by docid

double QueryNode::dw [protected]
 

The default score.

int QueryNode::entries [protected]
 

Number of children in ch.

int QueryNode::it [protected]
 

query node id

DOCID_T QueryNode::nextDoc
 

the next document this node matched.

ProxInfo* QueryNode::proxList
 

This node's ProxInfo list.

double QueryNode::w [protected]
 

query node weight


The documentation for this class was generated from the following files:
Generated on Wed Nov 3 12:59:52 2004 for Lemur Toolkit by doxygen1.2.18