void euclid_lsh::neighbor_row( const common::sfv_t& query, vector<pair<string, float> >& ids, uint64_t ret_num) const { neighbor_row_from_hash( cosine_lsh(query, hash_num_), l2norm(query), ids, ret_num); }
void euclid_lsh::neighbor_row( const common::sfv_t& query, vector<pair<string, float> >& ids, uint64_t ret_num) const { util::concurrent::scoped_rlock lk(get_const_table()->get_mutex()); /* table lock acquired; all subsequent table operations must be nolock */ neighbor_row_from_hash( cosine_lsh(query, hash_num_, threads_, cache_), l2norm(query), ids, ret_num); }
storage::bit_vector lsh::hash(const common::sfv_t& sfv) const { return cosine_lsh(sfv, bitnum()); }
void euclid_lsh::set_row(const string& id, const common::sfv_t& sfv) { // TODO(beam2d): support nested algorithm, e.g. when used by lof and then we // cannot suppose that the first two columns are assigned to euclid_lsh. get_table()->add(id, owner(my_id_), cosine_lsh(sfv, hash_num_, threads_, cache_), l2norm(sfv)); }
void euclid_lsh::set_row(const string& id, const common::sfv_t& sfv) { get_table()->add(id, owner(my_id_), cosine_lsh(sfv, hash_num_), l2norm(sfv)); }
storage::bit_vector lsh::hash(const common::sfv_t& sfv) const { return cosine_lsh(sfv, bitnum(), threads_, cache_); }