Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building errors #111

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Current head (v.1.2 RC)
- Bug-fixes and code improvements
- [fitting] Use variadic template for basket extensions (#85)
- [fitting] Fix current status issue (#108)
- [spatialPartitioning] Fix potential compilation issues in KnnGraph (#111)

-Docs
- [fitting] Clarify documentation on FIT_RESULT (#108)
Expand Down
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
Loading