ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
knncpp::EuclideanDistance< Scalar > Struct Template Reference

#include <knncpp.h>

Public Member Functions

template<typename DerivedA , typename DerivedB >
Scalar operator() (const Eigen::MatrixBase< DerivedA > &lhs, const Eigen::MatrixBase< DerivedB > &rhs) const
 
Scalar operator() (const Scalar lhs, const Scalar rhs) const
 
Scalar operator() (const Scalar val) const
 

Detailed Description

template<typename Scalar>
struct knncpp::EuclideanDistance< Scalar >

Euclidean distance functor. This the same as the L2 minkowski distance but more efficient.

See also
ManhattenDistance, ChebyshevDistance, MinkowskiDistance

Definition at line 84 of file knncpp.h.

Member Function Documentation

◆ operator()() [1/3]

template<typename Scalar >
template<typename DerivedA , typename DerivedB >
Scalar knncpp::EuclideanDistance< Scalar >::operator() ( const Eigen::MatrixBase< DerivedA > &  lhs,
const Eigen::MatrixBase< DerivedB > &  rhs 
) const
inline

Compute the unrooted distance between two vectors.

Parameters
lhsvector on left hand side
rhsvector on right hand side

Definition at line 89 of file knncpp.h.

◆ operator()() [2/3]

template<typename Scalar >
Scalar knncpp::EuclideanDistance< Scalar >::operator() ( const Scalar  lhs,
const Scalar  rhs 
) const
inline

Compute the unrooted distance between two scalars.

Parameters
lhsscalar on left hand side
rhsscalar on right hand side

Definition at line 104 of file knncpp.h.

◆ operator()() [3/3]

template<typename Scalar >
Scalar knncpp::EuclideanDistance< Scalar >::operator() ( const Scalar  val) const
inline

Compute the root of a unrooted distance value.

Parameters
valueunrooted distance value

Definition at line 111 of file knncpp.h.


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