namespace kgraph;
class KGraph {
public:
struct SearchParams {
SearchParams (); // constructor that initialize every parameter to default value.
unsigned K; // interested K, default = 10.
float epsilon; // only return points with distance <= epsilon, default 1e30.
unsigned P; // cost parameter. default is 100. increase for higher recall. It's good to use 1000s, but probably not beyond 10,000.
unsigned M; // default is 0. If the larger of this M and the M of a data point is used for search.
unsigned T; // run T independent trials with different randomization and merge the results.
unsigned seed; // random number seed. The same as in indexing parameters.
unsigned init; // default is 0. See below for usage.
};
struct SearchInfo {
float cost; // number of distance computations divided by N -- the cost of brutal force search.
};
virtual unsigned search (SearchOracle const &oracle, SearchParams const ¶ms, unsigned *ids, SearchInfo *info);
};
}