MCPcopy Create free account
hub / github.com/davisking/dlib / test_knn_lsh_sparse

Function test_knn_lsh_sparse

dlib/test/linear_manifold_regularizer.cpp:44–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 3

get_random_gaussianMethod · 0.80
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected