Xapian::Similarity Class Referenceabstract

Base class for calculating the similarity between documents. More...

`#include <cluster.h>`

Inheritance diagram for Xapian::Similarity:
[legend]

## Public Member Functions

virtual | ~Similarity ()
| Destructor.
virtual double | similarity (const PointType &a, const PointType &b) const =0
| Calculates the similarity between the two documents.
virtual std::string | get_description () const =0
| Returns a string describing the similarity metric being used.

## Detailed Description

Base class for calculating the similarity between documents.

## Member Function Documentation

## get_description()

virtual std::string Xapian::Similarity::get_description | ( |  | ) | const

pure virtual

Returns a string describing the similarity metric being used.

Implemented in Xapian::CosineDistance.

## similarity()

virtual double Xapian::Similarity::similarity | ( | const PointType & | a,
|  | const PointType & | b ) const

pure virtual

Calculates the similarity between the two documents.

Parameters

  a | First point object for distance calculation
  b | Second point object for distance calculation

Implemented in Xapian::CosineDistance.

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

- xapian/cluster.h