Skip to content

Commit dab299e

Browse files
committed
Rename performance test
1 parent 66a355a commit dab299e

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ add_executable(run_tests ${TEST_SRC})
2121
target_link_libraries(run_tests ${FLANN_LIBRARIES})
2222

2323
if(${BUILD_PERFORMANCE_TEST})
24-
add_executable(test_performance test_performance.cpp)
24+
add_executable(test_perform_euclid "test_perform_euclid.cpp")
2525
endif(${BUILD_PERFORMANCE_TEST})
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Created On: 30 Jan 2019
55
*/
66

7+
#include <knn/brute_force.h>
78
#include <knn/kdtree_minkowski.h>
89
#include <knn/kdtree_flann.h>
910
#include <string>
@@ -81,7 +82,16 @@ int main(int argc, char** argv)
8182
std::cout << "Matrix (" << mat.rows() << "," << mat.cols() << ")" << std::endl;
8283
std:: cout << mat.block(0, 0, 3, 10) << std::endl;
8384

84-
knn::KDTreeMinkowski<Scalar> kdtree(mat);
85+
// knn::BruteForce<Scalar, knn::EuclideanDistance<Scalar>> bf(mat);
86+
// bf.setSorted(true);
87+
// bf.setMaxDistance(0.5);
88+
// bf.setThreads(0);
89+
// bf.setTakeRoot(false);
90+
//
91+
// std::cout << "BruteForce" << std::endl;
92+
// testPerformance(bf, mat);
93+
94+
knn::KDTreeMinkowski<Scalar, knn::EuclideanDistance<Scalar>> kdtree(mat);
8595
kdtree.setSorted(true);
8696
kdtree.setBalanced(false);
8797
kdtree.setCompact(true);
@@ -93,7 +103,6 @@ int main(int argc, char** argv)
93103
std::cout << "KDTreeMinkowski" << std::endl;
94104
testPerformance(kdtree, mat);
95105

96-
97106
knn::KDTreeFlann<Scalar> kdtree2(mat);
98107
kdtree2.setIndexParams(flann::KDTreeSingleIndexParams(16));
99108
kdtree2.setThreads(0);

0 commit comments

Comments
 (0)