22 #include "../common/exception.hpp"
23 #include "../common/jsonconfig.hpp"
26 using jubatus::util::lang::shared_ptr;
30 namespace nearest_neighbor {
33 const std::string& name,
35 shared_ptr<storage::column_table> table,
36 const std::string&
id) {
40 if (name ==
"euclid_lsh") {
41 return shared_ptr<nearest_neighbor_base>(
42 new euclid_lsh(config_cast_check<euclid_lsh::config>(config),
45 }
else if (name ==
"lsh") {
46 return shared_ptr<nearest_neighbor_base>(
47 new lsh(config_cast_check<lsh::config>(config), table,
id));
48 }
else if (name ==
"minhash") {
49 return shared_ptr<nearest_neighbor_base>(
50 new minhash(config_cast_check<minhash::config>(config), table,
id));
T config_cast_check(const config &c)
#define JUBATUS_EXCEPTION(e)
shared_ptr< nearest_neighbor_base > create_nearest_neighbor(const std::string &name, const common::jsonconfig::config &config, shared_ptr< storage::column_table > table, const std::string &id)