Skip to content

Commit

Permalink
Merge pull request #2 from Jaybro/eigen_adaptor
Browse files Browse the repository at this point in the history
eigen_adaptor.hpp is now part of the library.
  • Loading branch information
Jaybro authored Oct 24, 2020
2 parents 472180a + 64170c9 commit 651bd13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions examples/eigen/eigen.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include <Eigen/Dense>
#include <pico_tree/eigen_adaptor.hpp>
#include <pico_tree/kd_tree.hpp>
#include <point.hpp>
#include <scoped_timer.hpp>

#include "eigen_adaptor.hpp"

using Index = int;
using Scalar = double;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once

#include <Eigen/Dense>

namespace pico_tree {

namespace internal {
Expand All @@ -26,9 +24,8 @@ class EigenAdaptorBase<Index_, EigenMatrix, false> {
}

//! Returns dimension \p dim of point \p point.
template <typename Derived>
inline Scalar operator()(
Eigen::MatrixBase<Derived> const& point, Index const dim) const {
template <typename Point>
inline Scalar operator()(Point const& point, Index const dim) const {
return point(dim);
}

Expand Down Expand Up @@ -59,9 +56,8 @@ class EigenAdaptorBase<Index_, EigenMatrix, true> {
}

//! Returns dimension \p dim of point \p point.
template <typename Derived>
inline Scalar operator()(
Eigen::MatrixBase<Derived> const& point, Index const dim) const {
template <typename Point>
inline Scalar operator()(Point const& point, Index const dim) const {
return point(dim);
}

Expand Down

0 comments on commit 651bd13

Please sign in to comment.