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

QueryNode Class Reference

#include <StructQueryRep.hpp>

Inheritance diagram for QueryNode:

AndQnode BandNotQnode BandQnode FiltRejQnode FiltReqQnode MaxQnode NotQnode OdnQNode OrQnode PassageQNode SumQnode SynQNode TermQnode UwnQNode WsumQnode 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)
 New QueryNode with given weight and default id (0).

 ~QueryNode ()
 clean up internal data.

virtual QnListchildren ()
 the children of this node

virtual int id ()
 the nodes id

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

virtual double weight ()
 the weight of this node.

virtual void setWeight (double wt)
virtual double proximityScore (DocumentRep *dR, double defaultScore)

Public Attributes

int dCnt
 number of documents this node matched

bool * dList
 array of bool matched docs indexed by docid

QnListch
 This node's children list.

ProxInfoproxList
 This node's ProxInfo list.

int entries
 Number of children in ch.

int nextDoc
 the next document this node matched.


Protected Attributes

int it
 query node id

double w
 query node weight


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 [inline]
 

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

QueryNode::~QueryNode   [inline]
 

clean up internal data.


Member Function Documentation

virtual QnList* QueryNode::children   [inline, virtual]
 

the children of this node

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

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

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

virtual int QueryNode::id   [inline, virtual]
 

the nodes id

virtual double QueryNode::proximityScore DocumentRep   dR,
double    defaultScore
[inline, virtual]
 

evaluate proximity operator against a document or passage. Prunes proxList to remove any entries that are no longer relevant to scoring this operator.

virtual void QueryNode::setWeight double    wt [inline, virtual]
 

virtual double QueryNode::weight   [inline, virtual]
 

the weight of this node.


Member Data Documentation

QnList* QueryNode::ch
 

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

int QueryNode::entries
 

Number of children in ch.

int QueryNode::it [protected]
 

query node id

int 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 file:
Generated on Mon Sep 30 14:14:17 2002 for LEMUR by doxygen1.2.18