8template <
class DataPo
int,
class WeightKernel>
9typename DistWeightFunc<DataPoint, WeightKernel>::VectorType
15template <
class DataPo
int,
class WeightKernel>
22template <
class DataPo
int,
class WeightKernel>
25 const DataPoint&)
const
29 return { (d <= m_t) ? m_wk.f(d/m_t) :
Scalar(0.), q };
32template <
class DataPo
int,
class WeightKernel>
35 const DataPoint&)
const
37 static_assert(WeightKernel::isDValid,
"First order derivatives are required");
41 if (d <= m_t && d !=
Scalar(0.)) result = (q / (d * m_t)) * m_wk.df(d/m_t);
45template <
class DataPo
int,
class WeightKernel>
48 const DataPoint&)
const
50 static_assert(WeightKernel::isDDValid,
"Second order derivatives are required");
54 if (d <= m_t && d !=
Scalar(0.))
56 Scalar der = m_wk.df(d/m_t);
57 result = q*q.transpose()/d*(m_wk.ddf(d/m_t)/m_t - der/d);
58 result.diagonal().array() += der;
59 result *=
Scalar(1.)/(m_t*d);
64template <
class DataPo
int,
class WeightKernel>
67 const DataPoint&)
const
69 static_assert(WeightKernel::isDValid,
"First order derivatives are required");
70 Scalar d = convertToLocalBasis(_q).norm();
71 return (d <= m_t) ?
Scalar( - d*m_wk.df(d/m_t)/(m_t*m_t) ) :
Scalar(0.);
74template <
class DataPo
int,
class WeightKernel>
77 const DataPoint&)
const
79 static_assert(WeightKernel::isDDValid,
"Second order derivatives are required");
80 Scalar d = convertToLocalBasis(_q).norm();
81 return (d <= m_t) ?
Scalar(
Scalar(2.)*d/(m_t*m_t*m_t)*m_wk.df(d/m_t) +
82 d*d/(m_t*m_t*m_t*m_t)*m_wk.ddf(d/m_t)) :
86template <
class DataPo
int,
class WeightKernel>
89 const DataPoint&)
const
91 static_assert(WeightKernel::isDDValid,
"Second order derivatives are required");
95 if (d <= m_t && d !=
Scalar(0.))
96 result = -q/(m_t*m_t)*(m_wk.df(d/m_t)/d + m_wk.ddf(d/m_t)/m_t);
Weighting function based on the euclidean distance between a query and a reference position.
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method w()
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.