|
xapian-core
1.5.0_git3747
|
Abstract class representing a point in the VSM. More...
Inheritance diagram for Xapian::PointType:Public Member Functions | |
| PointType () | |
| Default constructor. | |
| TermIterator | termlist_begin () const |
| Return a TermIterator to the beginning of the termlist. | |
| TermIterator | termlist_end () const noexcept |
| Return a TermIterator to the end of the termlist. | |
| bool | contains (const std::string &term) const |
| Validate whether a certain term exists in the termlist or not by performing a lookup operation in the existing values. More... | |
| double | get_weight (const std::string &term) const |
| Return the TF-IDF weight associated with a certain term. More... | |
| void | add_weight (const std::string &term, double weight) |
| Add the weight 'weight' to the mapping of a term. More... | |
| double | get_magnitude () const |
| Return the pre-computed squared magnitude. | |
| Xapian::termcount | termlist_size () const |
| Return the size of the termlist. | |
| PointType * | release () |
| Start reference counting this object. More... | |
| const PointType * | release () const |
| Start reference counting this object. More... | |
Protected Member Functions | |
| void | set_weight (const std::string &term, double weight) |
| Set the weight 'weight' to the mapping of a term. More... | |
Protected Attributes | |
| std::unordered_map< std::string, double > | weights |
| Implement a map to store the terms within a document and their pre-computed TF-IDF weights. | |
| double | magnitude = 0.0 |
| Store the squared magnitude of the PointType. | |
Abstract class representing a point in the VSM.
| void Xapian::PointType::add_weight | ( | const std::string & | term, |
| double | weight | ||
| ) |
Add the weight 'weight' to the mapping of a term.
| term | Term to which the weight is to be added |
| weight | Weight which has to be added to the existing mapping of the term |
| bool Xapian::PointType::contains | ( | const std::string & | term | ) | const |
Validate whether a certain term exists in the termlist or not by performing a lookup operation in the existing values.
| term | Term which is to be searched |
| double Xapian::PointType::get_weight | ( | const std::string & | term | ) | const |
Return the TF-IDF weight associated with a certain term.
| term | Term for which TF-IDF weight is returned |
|
inline |
|
inline |
|
protected |
Set the weight 'weight' to the mapping of a term.
| term | Term for which the weight is supposed to be changed |
| weight | The weight to which the mapping of the term is to be set |