Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TradWeight Class Reference

Traditional probabilistic weighting scheme (as used by Muscat 3.6). More...

#include <omenquire.h>

Inheritance diagram for TradWeight:

OmWeight List of all members.

Public Methods

 TradWeight (double k=1)
 Construct a TradWeight. More...

OmWeightclone () const
 Return a new weight object of this type. More...

 ~TradWeight ()
std::string name () const
 Name of the weighting scheme. More...

std::string serialise () const
 Serialise object parameters into a string. More...

OmWeightunserialise (const std::string &s) const
om_weight get_sumpart (om_termcount wdf, om_doclength len) const
 Get a weight which is part of the sum over terms being performed. More...

om_weight get_maxpart () const
 Gets the maximum value that get_sumpart() may return. More...

om_weight get_sumextra (om_doclength len) const
 Get an extra weight for a document to add to the sum calculated over the query terms. More...

om_weight get_maxextra () const
 Gets the maximum value that get_sumextra() may return. More...

bool get_sumpart_needs_doclength () const
 return false if the weight object doesn't need doclength. More...


Detailed Description

Traditional probabilistic weighting scheme (as used by Muscat 3.6).


Constructor & Destructor Documentation

TradWeight::TradWeight double    k = 1 [inline]
 

Construct a TradWeight.


Member Function Documentation

OmWeight* TradWeight::clone   const [inline, virtual]
 

Return a new weight object of this type.

Implements OmWeight.

om_weight TradWeight::get_maxextra   const [virtual]
 

Gets the maximum value that get_sumextra() may return.

This is used in optimising searches.

Implements OmWeight.

om_weight TradWeight::get_maxpart   const [virtual]
 

Gets the maximum value that get_sumpart() may return.

This is used in optimising searches, by having the postlist tree decay appropriately when parts of it can have limited, or no, further effect.

Implements OmWeight.

om_weight TradWeight::get_sumextra om_doclength    len const [virtual]
 

Get an extra weight for a document to add to the sum calculated over the query terms.

This returns a weight for a given document, and is used by some weighting schemes to account for influence such as document length.

Parameters:
len  the (unnormalised) document length.

Implements OmWeight.

om_weight TradWeight::get_sumpart om_termcount    wdf,
om_doclength    len
const [virtual]
 

Get a weight which is part of the sum over terms being performed.

This returns a weight for a given term and document. These weights are summed to give a total weight for the document.

Parameters:
wdf  the within document frequency of the term.
len  the (unnormalised) document length.

Implements OmWeight.

bool TradWeight::get_sumpart_needs_doclength   const [inline, virtual]
 

return false if the weight object doesn't need doclength.

Reimplemented from OmWeight.

std::string TradWeight::name   const [inline, virtual]
 

Name of the weighting scheme.

Implements OmWeight.

std::string TradWeight::serialise   const [virtual]
 

Serialise object parameters into a string.

Implements OmWeight.


The documentation for this class was generated from the following file:
Documentation for Xapian (version 0.6.3).
Generated on 14 Dec 2002 by Doxygen 1.2.15.