#include <rset.h>
Collaboration diagram for RSetI:
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::docid > | documents |
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::Internal * | dbroot |
std::map< string, Xapian::doccount > | reltermfreqs |
bool | calculated_reltermfreqs |
This is used internally, and performs the calculation and caching of relevant term frequencies.
Definition at line 41 of file rset.h.
RSetI::RSetI | ( | const RSetI & | ) | [private] |
RSetI::RSetI | ( | const Xapian::Database & | root_, | |
const Xapian::RSet & | rset | |||
) | [inline] |
RSetI::RSetI | ( | const Xapian::Database::Internal * | dbroot_, | |
const Xapian::RSet & | rset | |||
) | [inline] |
Initialise with a Xapian::Database::Internal and a Xapian::RSet.
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.
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.
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().
const Xapian::Database RSetI::root [private] |
const Xapian::Database::Internal* RSetI::dbroot [private] |
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] |
std::set<Xapian::docid> RSetI::documents |
Definition at line 60 of file rset.h.
Referenced by OmExpand::build_tree(), calculate_stats(), and get_rsize().