Loading...
Searching...
No Matches
nanoflann::SO2_Adaptor< T, DataSource, _DistanceType, IndexType > Struct Template Reference
nanoflann C++ library for KD-trees » Metric (distance) classes

`#include <nanoflann.hpp>`

## Public Types

using | ElementType = T
using | DistanceType = _DistanceType

## Public Member Functions

| SO2_Adaptor (const DataSource &_data_source)
DistanceType | evalMetric (const T *a, const IndexType b_idx, size_t size) const
template<typename U, typename V>
DistanceType | accum_dist (const U a, const V b, const size_t) const

## Public Attributes

const DataSource & | data_source

## Detailed Description

template<class T, class DataSource, typename _DistanceType = T, typename IndexType = size_t>
struct nanoflann::SO2_Adaptor< T, DataSource, _DistanceType, IndexType >

SO2 distance functor Corresponding distance traits: nanoflann::metric_SO2

Template Parameters

  T | Type of the elements (e.g. double, float, uint8_t)
  DataSource | Source of the data, i.e. where the vectors are stored
  _DistanceType | Type of distance variables (must be signed) (e.g. float, double) orientation is constrained to be in [-pi, pi]
  IndexType | Type of the arguments with which the data can be accessed (e.g. float, double, int64_t, T*)

## Member Function Documentation

## accum_dist()

template<class T, class DataSource, typename _DistanceType = T, typename IndexType = size_t>
template<typename U, typename V>

DistanceType nanoflann::SO2_Adaptor< T, DataSource, _DistanceType, IndexType >::accum_dist | ( | const U | a,
|  | const V | b,
|  | const size_t | ) const

inline

Returns the absolute shortest angular distance between a and b, assuming both are in [-pi, pi]. The result is in [0, pi], which satisfies the non-negativity requirement of a kd-tree metric and gives correct nearest-neighbour pruning.

The documentation for this struct was generated from the following file:

- include/nanoflann.hpp