1
1
#include < gtest/gtest.h>
2
2
3
3
#include < pico_tree/eigen3_traits.hpp>
4
- #include < pico_tree/kd_tree.hpp>
5
4
6
5
#include " common.hpp"
7
6
@@ -11,20 +10,7 @@ void CheckEigenAdaptorInterface() {
11
10
RowMatrix row_matrix = RowMatrix::Random (4 , 8 );
12
11
13
12
CheckSpaceAdaptor<static_cast <pico_tree::Size>(ColMatrix::RowsAtCompileTime)>(
14
- col_matrix,
15
- col_matrix.rows (),
16
- col_matrix.cols (),
17
- static_cast <Eigen::Index>(0 ),
18
- col_matrix.col (0 ).data ());
19
- CheckSpaceAdaptor<static_cast <pico_tree::Size>(RowMatrix::ColsAtCompileTime)>(
20
- row_matrix,
21
- row_matrix.cols (),
22
- row_matrix.rows (),
23
- static_cast <Eigen::Index>(0 ),
24
- row_matrix.row (0 ).data ());
25
-
26
- CheckSpaceAdaptor<static_cast <pico_tree::Size>(ColMatrix::RowsAtCompileTime)>(
27
- std::ref (col_matrix),
13
+ std::cref (col_matrix),
28
14
col_matrix.rows (),
29
15
col_matrix.cols (),
30
16
col_matrix.cols () - 1 ,
@@ -33,11 +19,11 @@ void CheckEigenAdaptorInterface() {
33
19
std::cref (row_matrix),
34
20
row_matrix.cols (),
35
21
row_matrix.rows (),
36
- col_matrix .rows () - 1 ,
22
+ row_matrix .rows () - 1 ,
37
23
row_matrix.row (row_matrix.rows () - 1 ).data ());
38
24
}
39
25
40
- TEST (EigenTest , Interface) {
26
+ TEST (Eigen3TraitsTest , Interface) {
41
27
// Spatial dimension known.
42
28
CheckEigenAdaptorInterface<
43
29
Eigen::Matrix<float , 4 , Eigen::Dynamic, Eigen::ColMajor>,
@@ -47,11 +33,3 @@ TEST(EigenTest, Interface) {
47
33
Eigen::Matrix<float , Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>,
48
34
Eigen::Matrix<float , Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>>();
49
35
}
50
-
51
- TEST (EigenTest, TreeCompatibility) {
52
- Eigen::Matrix4Xd matrix = Eigen::Matrix4Xd::Random (4 , 8 );
53
-
54
- pico_tree::KdTree<Eigen::Matrix4Xd> tree (std::move (matrix), 10 );
55
-
56
- TestKnn (tree, 2 );
57
- }
0 commit comments