| 42 | |
| 43 | template <typename scalar_type> |
| 44 | void test_knn_lsh_sparse() |
| 45 | { |
| 46 | dlib::rand rnd; |
| 47 | std::vector<std::map<unsigned long,scalar_type> > samples; |
| 48 | samples.resize(20); |
| 49 | for (unsigned int i = 0; i < samples.size(); ++i) |
| 50 | { |
| 51 | samples[i][0] = rnd.get_random_gaussian(); |
| 52 | samples[i][2] = rnd.get_random_gaussian(); |
| 53 | } |
| 54 | |
| 55 | test_find_k_nearest_neighbors_lsh<hash_similar_angles_64>(samples); |
| 56 | test_find_k_nearest_neighbors_lsh<hash_similar_angles_128>(samples); |
| 57 | test_find_k_nearest_neighbors_lsh<hash_similar_angles_256>(samples); |
| 58 | test_find_k_nearest_neighbors_lsh<hash_similar_angles_512>(samples); |
| 59 | } |
| 60 | |
| 61 | template <typename scalar_type> |
| 62 | void test_knn_lsh_dense() |
nothing calls this directly
no test coverage detected