RSetI Class Reference

A relevance set. More...

#include <rset.h>

Collaboration diagram for RSetI:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RSetI (const Xapian::Database &root_, const Xapian::RSet &rset)
 Initialise with a Xapian::Database and a Xapian::RSet.
 RSetI (const Xapian::Database::Internal *dbroot_, const Xapian::RSet &rset)
 Initialise with a Xapian::Database::Internal and a Xapian::RSet.
void will_want_reltermfreq (string tname)
 Mark a term for calculation of the reltermfreq.
void contribute_stats (Stats &stats)
 Calculate the statistics, and add them to a Stats object.
Xapian::doccount get_rsize () const
 Get the number of documents in the RSet.

Public Attributes

std::set< Xapian::dociddocuments

Private Member Functions

 RSetI (const RSetI &)
void operator= (const RSetI &)
void calculate_stats ()
 Calculate the statistics.

Private Attributes

const Xapian::Database root
const Xapian::Database::Internaldbroot
std::map< string, Xapian::doccountreltermfreqs
bool calculated_reltermfreqs

Detailed Description

A relevance set.

This is used internally, and performs the calculation and caching of relevant term frequencies.

Definition at line 41 of file rset.h.


Constructor & Destructor Documentation

RSetI::RSetI ( const RSetI  )  [private]

RSetI::RSetI ( const Xapian::Database root_,
const Xapian::RSet rset 
) [inline]

Initialise with a Xapian::Database and a Xapian::RSet.

Definition at line 89 of file rset.h.

RSetI::RSetI ( const Xapian::Database::Internal dbroot_,
const Xapian::RSet rset 
) [inline]

Initialise with a Xapian::Database::Internal and a Xapian::RSet.

Definition at line 97 of file rset.h.


Member Function Documentation

void RSetI::operator= ( const RSetI  )  [private]

void RSetI::calculate_stats (  )  [private]

Calculate the statistics.

This should be called only once.

Definition at line 35 of file rset.cc.

References Assert, calculated_reltermfreqs, dbroot, DEBUGCALL, DEBUGLINE, documents, Xapian::Database::Internal::open_term_list(), reltermfreqs, root, Xapian::Database::termlist_begin(), and Xapian::Database::termlist_end().

Referenced by contribute_stats().

void RSetI::will_want_reltermfreq ( string  tname  )  [inline]

Mark a term for calculation of the reltermfreq.

Parameters:
tname The term for which the reltermfreq is desired.

Definition at line 104 of file rset.h.

References reltermfreqs.

Referenced by LocalSubMatch::prepare_match().

void RSetI::contribute_stats ( Stats stats  ) 

Calculate the statistics, and add them to a Stats object.

This method must only be called once for a given RSet.

Parameters:
stats The Stats object to pass the weights to.

Definition at line 78 of file rset.cc.

References calculate_stats(), DEBUGCALL, get_rsize(), reltermfreqs, Stats::rset_size, and Stats::set_reltermfreq().

Referenced by LocalSubMatch::prepare_match().

Xapian::doccount RSetI::get_rsize (  )  const [inline]

Get the number of documents in the RSet.

Definition at line 110 of file rset.h.

References documents.

Referenced by contribute_stats(), and OmExpand::expand().


Member Data Documentation

const Xapian::Database RSetI::root [private]

Definition at line 48 of file rset.h.

Referenced by calculate_stats().

const Xapian::Database::Internal* RSetI::dbroot [private]

Definition at line 49 of file rset.h.

Referenced by calculate_stats().

std::map<string, Xapian::doccount> RSetI::reltermfreqs [private]

Definition at line 51 of file rset.h.

Referenced by calculate_stats(), contribute_stats(), and will_want_reltermfreq().

bool RSetI::calculated_reltermfreqs [private]

Definition at line 52 of file rset.h.

Referenced by calculate_stats().

std::set<Xapian::docid> RSetI::documents

Definition at line 60 of file rset.h.

Referenced by OmExpand::build_tree(), calculate_stats(), and get_rsize().


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.