Ponca  40f245e28b920cbb763a1c6282156c87c626f24c
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 "./defines.h"
10#include PONCA_MULTIARCH_INCLUDE_CU_STD(limits)
11#include <type_traits>
12
13namespace Ponca {
14
16template<typename Index, typename Scalar>
18{
20 Index index {-1};
21
23 Scalar squared_distance { PONCA_MULTIARCH_CU_STD_NAMESPACE(numeric_limits)<Scalar>::max() };
24
26 inline bool operator < (const IndexSquaredDistance& other) const
27 { return squared_distance < other.squared_distance; }
28};
29
30}
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.