Ponca  aa50bfdf187919869239c5b44b748842569114c1
Point Cloud Analysis library
Loading...
Searching...
No Matches
indexSquaredDistance.h
1/*
2 This Source Code Form is subject to the terms of the Mozilla Public
3 License, v. 2.0. If a copy of the MPL was not distributed with this
4 file, You can obtain one at http://mozilla.org/MPL/2.0/.
5*/
6
7#pragma once
8
9#include <limits>
10#include <type_traits>
11
12#include "./defines.h"
13
14namespace Ponca {
15
17template<typename Index, typename Scalar>
19{
21 Index index {-1};
22
24 Scalar squared_distance { std::numeric_limits<Scalar>::max() };
25
27 inline bool operator < (const IndexSquaredDistance& other) const
28 { return squared_distance < other.squared_distance; }
29};
30
31}
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Associates an index with a distance.
bool operator<(const IndexSquaredDistance &other) const
Comparison operator based on squared_distance.
Scalar squared_distance
Distance to the closest point.