xapian-core  2.0.0
Public Member Functions | Private Attributes | Friends | List of all members
HoneyInverter::PostingChanges Class Reference

Class for storing the changes in frequencies for a term. More...

+ Collaboration diagram for HoneyInverter::PostingChanges:

Public Member Functions

 PostingChanges (Xapian::docid did, Xapian::termcount wdf)
 Constructor for an added posting. More...
 
 PostingChanges (Xapian::docid did, Xapian::termcount wdf, bool)
 Constructor for a removed posting. More...
 
 PostingChanges (Xapian::docid did, Xapian::termcount old_wdf, Xapian::termcount new_wdf)
 Constructor for an updated posting. More...
 
void add_posting (Xapian::docid did, Xapian::termcount wdf)
 Add a posting. More...
 
void remove_posting (Xapian::docid did, Xapian::termcount wdf)
 Remove a posting. More...
 
void update_posting (Xapian::docid did, Xapian::termcount old_wdf, Xapian::termcount new_wdf)
 Update a posting. More...
 
Xapian::termcount get_tfdelta () const
 Get the term frequency delta. More...
 
Xapian::termcount get_cfdelta () const
 Get the collection frequency delta. More...
 

Private Attributes

Xapian::termcount tf_delta
 Change in term frequency. More...
 
Xapian::termcount cf_delta
 Change in collection frequency. More...
 
std::map< Xapian::docid, Xapian::termcountpl_changes
 Changes to this term's postlist. More...
 

Friends

class HoneyPostListTable
 

Detailed Description

Class for storing the changes in frequencies for a term.

Definition at line 52 of file honey_inverter.h.

Constructor & Destructor Documentation

◆ PostingChanges() [1/3]

HoneyInverter::PostingChanges::PostingChanges ( Xapian::docid  did,
Xapian::termcount  wdf 
)
inline

Constructor for an added posting.

Definition at line 72 of file honey_inverter.h.

References pl_changes.

◆ PostingChanges() [2/3]

HoneyInverter::PostingChanges::PostingChanges ( Xapian::docid  did,
Xapian::termcount  wdf,
bool   
)
inline

Constructor for a removed posting.

Definition at line 79 of file honey_inverter.h.

References HoneyInverter::DELETED_POSTING, and pl_changes.

◆ PostingChanges() [3/3]

HoneyInverter::PostingChanges::PostingChanges ( Xapian::docid  did,
Xapian::termcount  old_wdf,
Xapian::termcount  new_wdf 
)
inline

Constructor for an updated posting.

Definition at line 87 of file honey_inverter.h.

References pl_changes.

Member Function Documentation

◆ add_posting()

void HoneyInverter::PostingChanges::add_posting ( Xapian::docid  did,
Xapian::termcount  wdf 
)
inline

Add a posting.

Definition at line 96 of file honey_inverter.h.

References cf_delta, pl_changes, tf_delta, and UNSIGNED_OVERFLOW_OK.

◆ get_cfdelta()

Xapian::termcount HoneyInverter::PostingChanges::get_cfdelta ( ) const
inline

Get the collection frequency delta.

Definition at line 124 of file honey_inverter.h.

References cf_delta.

◆ get_tfdelta()

Xapian::termcount HoneyInverter::PostingChanges::get_tfdelta ( ) const
inline

Get the term frequency delta.

Definition at line 121 of file honey_inverter.h.

References tf_delta.

◆ remove_posting()

void HoneyInverter::PostingChanges::remove_posting ( Xapian::docid  did,
Xapian::termcount  wdf 
)
inline

Remove a posting.

Definition at line 105 of file honey_inverter.h.

References cf_delta, HoneyInverter::DELETED_POSTING, pl_changes, tf_delta, and UNSIGNED_OVERFLOW_OK.

◆ update_posting()

void HoneyInverter::PostingChanges::update_posting ( Xapian::docid  did,
Xapian::termcount  old_wdf,
Xapian::termcount  new_wdf 
)
inline

Update a posting.

Definition at line 114 of file honey_inverter.h.

References cf_delta, pl_changes, and UNSIGNED_OVERFLOW_OK.

Friends And Related Function Documentation

◆ HoneyPostListTable

friend class HoneyPostListTable
friend

Definition at line 53 of file honey_inverter.h.

Member Data Documentation

◆ cf_delta

Xapian::termcount HoneyInverter::PostingChanges::cf_delta
private

Change in collection frequency.

Note: Stored as an unsigned quantity to add to current cf.

Definition at line 65 of file honey_inverter.h.

Referenced by add_posting(), get_cfdelta(), remove_posting(), and update_posting().

◆ pl_changes

std::map<Xapian::docid, Xapian::termcount> HoneyInverter::PostingChanges::pl_changes
private

Changes to this term's postlist.

Definition at line 68 of file honey_inverter.h.

Referenced by add_posting(), PostingChanges(), remove_posting(), and update_posting().

◆ tf_delta

Xapian::termcount HoneyInverter::PostingChanges::tf_delta
private

Change in term frequency.

Note: Stored as an unsigned quantity to add to current tf.

Definition at line 59 of file honey_inverter.h.

Referenced by add_posting(), get_tfdelta(), and remove_posting().


The documentation for this class was generated from the following file: