Commit a2f251bc authored by Thibault Lejemble's avatar Thibault Lejemble

cross derivative of weighting function

parent fa5c228e
......@@ -122,6 +122,24 @@ public:
MULTIARCH inline Scalar scaled2w(const VectorType& _q,
const DataPoint& /*attributes*/) const;
\brief Cross derivative in scale \f$t\f$ and in space (for each spatial dimension \f$\mathsf{x})\f$
\f$ \frac{\delta^2 \frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}}{\delta t\ \delta \mathsf{x}}
\nabla w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) +
\frac{\delta \frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}}{\delta \mathsf{x}}
\frac{\delta \frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}}{\delta t}
\nabla^2 w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) =
\left( \frac{1}{\left|\mathbf{q}_\mathsf{x}\right|}\nabla w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) +
\frac{1}{t}\nabla^2 w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) \right)\f$
where \f$ \left|\mathbf{q}_\mathsf{x}\right| \f$ represents the norm of the
query coordinates expressed in centered basis.
MULTIARCH inline VectorType scaleSpaced2w(const VectorType& _q,
const DataPoint& /*attributes*/) const;
/*! \brief Access to the evaluation scale set during the initialization */
MULTIARCH inline Scalar evalScale() const { return m_t; }
......@@ -62,3 +62,17 @@ DistWeightFunc<DataPoint, WeightKernel>::scaled2w( const VectorType& _q,
d*d/(m_t*m_t*m_t*m_t)*m_wk.ddf(d/m_t)) :
template <class DataPoint, class WeightKernel>
typename DistWeightFunc<DataPoint, WeightKernel>::VectorType
DistWeightFunc<DataPoint, WeightKernel>::scaleSpaced2w( const VectorType& _q,
const DataPoint&) const
VectorType result = VectorType::Zero();
Scalar d = _q.norm();
if (d <= m_t && d != Scalar(0.))
result = -_q/(m_t*m_t)*(m_wk.df(d/m_t)/d + m_wk.ddf(d/m_t)/m_t);
return result;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment