Abstract class representing a point in the VSM.
More...
#include <cluster.h>
|
| std::unordered_map< std::string, double > | weights |
| | Implement a map to store the terms within a document and their pre-computed TF-IDF weights. More...
|
| |
| double | magnitude = 0.0 |
| | Store the squared magnitude of the PointType. More...
|
| |
Abstract class representing a point in the VSM.
Definition at line 224 of file cluster.h.
◆ PointType()
| Xapian::PointType::PointType |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 248 of file cluster.h.
◆ add_weight()
| void Xapian::PointType::add_weight |
( |
std::string_view |
term, |
|
|
double |
weight |
|
) |
| |
|
inline |
Add the weight 'weight' to the mapping of a term.
- Parameters
-
| term | Term to which the weight is to be added |
| weight | Weight which has to be added to the existing mapping of the term |
Definition at line 282 of file cluster.h.
References term.
◆ contains()
| bool Xapian::PointType::contains |
( |
std::string_view |
term | ) |
const |
|
inline |
Validate whether a certain term exists in the termlist or not by performing a lookup operation in the existing values.
- Parameters
-
| term | Term which is to be searched |
Definition at line 263 of file cluster.h.
References term.
◆ get_magnitude()
| double Xapian::PointType::get_magnitude |
( |
| ) |
const |
|
inline |
Return the pre-computed squared magnitude.
Definition at line 287 of file cluster.h.
◆ get_weight()
| double Xapian::PointType::get_weight |
( |
std::string_view |
term | ) |
const |
|
inline |
Return the TF-IDF weight associated with a certain term.
- Parameters
-
| term | Term for which TF-IDF weight is returned |
Definition at line 271 of file cluster.h.
References term.
◆ release() [1/2]
Start reference counting this object.
You can transfer ownership of a dynamically allocated PointType object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required.
Definition at line 299 of file cluster.h.
◆ release() [2/2]
| const PointType* Xapian::PointType::release |
( |
| ) |
const |
|
inline |
Start reference counting this object.
You can transfer ownership of a dynamically allocated PointType object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required.
Definition at line 311 of file cluster.h.
◆ set_weight()
| void Xapian::PointType::set_weight |
( |
std::string_view |
term, |
|
|
double |
weight |
|
) |
| |
|
inlineprotected |
Set the weight 'weight' to the mapping of a term.
- Parameters
-
| 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 |
Definition at line 242 of file cluster.h.
References term.
◆ termlist_begin()
◆ termlist_end()
◆ termlist_size()
Return the size of the termlist.
Definition at line 290 of file cluster.h.
◆ magnitude
| double Xapian::PointType::magnitude = 0.0 |
|
protected |
◆ weights
| std::unordered_map<std::string, double> Xapian::PointType::weights |
|
protected |
Implement a map to store the terms within a document and their pre-computed TF-IDF weights.
Definition at line 230 of file cluster.h.
The documentation for this class was generated from the following file: