Skip to content

Commit 628cc98

Browse files
committed
Removed unused compile time constant dims.
1 parent 862d7d9 commit 628cc98

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

examples/eigen/eigen_adaptor.hpp

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@ namespace pico_tree {
66

77
namespace internal {
88

9-
template <int Dims_>
10-
struct EigenDimensions {
11-
inline static constexpr int Dims(int) { return Dims_; }
12-
};
13-
14-
template <>
15-
struct EigenDimensions<Eigen::Dynamic> {
16-
inline static int Dims(int dims) { return dims; }
17-
};
18-
199
template <typename Index, typename EigenMatrix, bool RowMajor>
2010
class EigenAdaptorBase;
2111

@@ -43,9 +33,7 @@ class EigenAdaptorBase<Index_, EigenMatrix, false> {
4333
}
4434

4535
//! Returns the amount of spatial dimensions of the points.
46-
inline Index num_dimensions() const {
47-
return EigenDimensions<Dims>::Dims(matrix_.rows());
48-
};
36+
inline Index num_dimensions() const { return matrix_.rows(); };
4937

5038
//! Returns the number of points.
5139
inline Index num_points() const { return matrix_.cols(); };
@@ -78,9 +66,7 @@ class EigenAdaptorBase<Index_, EigenMatrix, true> {
7866
}
7967

8068
//! Returns the amount of spatial dimensions of the points.
81-
inline Index num_dimensions() const {
82-
return EigenDimensions<Dims>::Dims(matrix_.cols());
83-
};
69+
inline Index num_dimensions() const { return matrix_.cols(); };
8470

8571
//! Returns the number of points.
8672
inline Index num_points() const { return matrix_.rows(); };

0 commit comments

Comments
 (0)