Skip to content

Commit

Permalink
Fixed building errors on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
julesvidal committed Oct 6, 2023
1 parent d2cda83 commit 5cc3180
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ class KnnGraphRangeQuery : public RangeIndexQuery<typename Traits::IndexType, ty

public:
inline Iterator begin(){
KnnGraphRangeIterator it(this);
Iterator it(this);
this->initialize(it);
this->advance(it);
return it;
}

inline Iterator end(){
return KnnGraphRangeIterator(this, m_graph->size());
return Iterator(this, m_graph->size());
}

protected:
Expand Down
8 changes: 4 additions & 4 deletions Ponca/src/SpatialPartitioning/KnnGraph/knnGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ template <typename Traits> class KnnGraphBase
: m_k(std::min(k,kdtree.index_count()-1)),
m_kdTreePoints(kdtree.point_data())
{
static_assert( std::is_same_v<typename Traits::DataPoint, typename KdTreeTraits::DataPoint>,
static_assert( std::is_same<typename Traits::DataPoint, typename KdTreeTraits::DataPoint>::value,
"KdTreeTraits::DataPoint is not equal to Traits::DataPoint" );
static_assert( std::is_same_v<typename Traits::PointContainer, typename KdTreeTraits::PointContainer>,
static_assert( std::is_same<typename Traits::PointContainer, typename KdTreeTraits::PointContainer>::value,
"KdTreeTraits::PointContainer is not equal to Traits::PointContainer" );
static_assert( std::is_same_v<typename Traits::IndexContainer, typename KdTreeTraits::IndexContainer>,
static_assert( std::is_same<typename Traits::IndexContainer, typename KdTreeTraits::IndexContainer>::value,
"KdTreeTraits::IndexContainer is not equal to Traits::IndexContainer" );

// We need to account for the entire point set, irrespectively of the sampling. This is because the kdtree
Expand Down Expand Up @@ -107,7 +107,7 @@ template <typename Traits> class KnnGraphBase
// Query -------------------------------------------------------------------
public:
inline KNearestIndexQuery k_nearest_neighbors(int index) const{
return KnnGraphKNearestQuery(this, index);
return KNearestIndexQuery(this, index);
}

inline RangeIndexQuery range_neighbors(int index, Scalar r) const{
Expand Down

0 comments on commit 5cc3180

Please sign in to comment.