Skip to content

Commit 8b36cc5

Browse files
committed
Removed support for EigenL2 due to updated query.
1 parent 519622c commit 8b36cc5

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

src/pico_tree/pico_tree/eigen.hpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -337,27 +337,6 @@ class EigenL1 {
337337
inline Scalar operator()(Scalar const x) const { return std::abs(x); }
338338
};
339339

340-
//! \brief EigenL2 metric for measuring Euclidean distances between points.
341-
template <typename Scalar>
342-
class EigenL2 {
343-
public:
344-
//! \brief Calculates the distance between points \p p0 and \p p1.
345-
template <typename Derived0, typename Derived1>
346-
inline Scalar operator()(
347-
Eigen::MatrixBase<Derived0> const& p0,
348-
Eigen::MatrixBase<Derived1> const& p1) const {
349-
return (p0 - p1).norm();
350-
}
351-
352-
//! \brief Calculates the distance between two coordinates.
353-
inline Scalar operator()(Scalar const x, Scalar const y) const {
354-
return std::abs(x - y);
355-
}
356-
357-
//! \brief Returns the absolute value of \p x.
358-
inline Scalar operator()(Scalar const x) const { return std::abs(x); }
359-
};
360-
361340
//! \brief The EigenL2Squared semimetric measures squared Euclidean distances
362341
//! between points.
363342
template <typename Scalar>

test/pico_tree/eigen_test.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,6 @@ TEST(EigenTest, EigenL1) {
2828
EXPECT_FLOAT_EQ(metric(-3.1f), 3.1f);
2929
}
3030

31-
TEST(EigenTest, EigenL2) {
32-
using PointX = Eigen::Vector2f;
33-
using Scalar = typename PointX::Scalar;
34-
35-
PointX p0{10.0f, 1.0f};
36-
PointX p1{7.0f, 5.0f};
37-
38-
pico_tree::EigenL2<Scalar> metric;
39-
40-
EXPECT_FLOAT_EQ(metric(p0, p1), 5.0f);
41-
EXPECT_FLOAT_EQ(metric(-3.1f, 8.9f), 12.0f);
42-
EXPECT_FLOAT_EQ(metric(-3.1f), 3.1f);
43-
}
44-
4531
TEST(EigenTest, EigenL2Squared) {
4632
using PointX = Eigen::Vector2f;
4733
using Scalar = typename PointX::Scalar;

0 commit comments

Comments
 (0)