Xapian::Internal::ExpandWeight Class Reference

Class for calculating probabilistic ESet term weights. More...

#include <expandweight.h>

Collaboration diagram for Xapian::Internal::ExpandWeight:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ExpandWeight (const Xapian::Database &db_, Xapian::doccount rsize_, bool use_exact_termfreq_, double expand_k_)
Xapian::weight get_weight (TermList *merger, const std::string &tname) const

Private Attributes

const Xapian::Database db
 The combined database.
Xapian::doccount rsize
 The number of documents in the RSet.
bool use_exact_termfreq
 Should we calculate the exact term frequency when generating an ESet?
double expand_k
 Parameter k in the probabilistic expand weighting formula.

Detailed Description

Class for calculating probabilistic ESet term weights.

Definition at line 86 of file expandweight.h.


Constructor & Destructor Documentation

Xapian::Internal::ExpandWeight::ExpandWeight ( const Xapian::Database db_,
Xapian::doccount  rsize_,
bool  use_exact_termfreq_,
double  expand_k_ 
)

Definition at line 38 of file expandweight.cc.

References DEBUGCALL.


Member Function Documentation

Xapian::weight Xapian::Internal::ExpandWeight::get_weight ( TermList merger,
const std::string &  tname 
) const

Definition at line 51 of file expandweight.cc.

References Assert, db, DEBUGCALL, DEBUGLINE, DEBUGMSG, expand_k, Xapian::Database::get_avlength(), Xapian::Database::get_doccount(), Xapian::Database::get_termfreq(), RETURN, rsize, and use_exact_termfreq.


Member Data Documentation

const Xapian::Database Xapian::Internal::ExpandWeight::db [private]

The combined database.

Definition at line 88 of file expandweight.h.

Referenced by get_weight().

Xapian::doccount Xapian::Internal::ExpandWeight::rsize [private]

The number of documents in the RSet.

Definition at line 91 of file expandweight.h.

Referenced by get_weight().

bool Xapian::Internal::ExpandWeight::use_exact_termfreq [private]

Should we calculate the exact term frequency when generating an ESet?

This only has any effect if we're using a combined database.

If this member is true, the exact term frequency will be obtained from the Database object. If this member is false, then an approximation is used to estimate the term frequency based on the term frequencies in the sub-databases which we see while collating term statistics, and the relative sizes of the sub-databases.

Definition at line 103 of file expandweight.h.

Referenced by get_weight().

double Xapian::Internal::ExpandWeight::expand_k [private]

Parameter k in the probabilistic expand weighting formula.

Definition at line 106 of file expandweight.h.

Referenced by get_weight().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.