Index oracle. More...
#include <kgraph.h>
Public Member Functions | |
virtual unsigned | size () const =0 |
Returns the size of the dataset. | |
virtual float | operator() (unsigned i, unsigned j) const =0 |
Computes similarity. More... | |
Index oracle.
The index oracle is the user-supplied plugin that computes the distance between two arbitrary objects in the dataset. It is used for offline k-NN graph construction.
|
pure virtual |
Computes similarity.
0 <= i, j < size() are the index of two objects in the dataset. This method return the distance between objects i and j.
Implemented in kgraph::MatrixOracle< DATA_TYPE, DIST_TYPE >, and DummyIndexOracle.