![]() |
Patate Lib
0.5
|
Inherits Grenaille::Concept::WeightFuncConcept< Point >.
Weighting function based on the euclidean distance between a query and a reference position.
The query is assumed to be expressed in centered coordinates (ie. relatively to the evaluation position).
This class inherits BaseWeightFunc. It can be specialized for any DataPoint, and uses a generic 1D BaseWeightKernel.
Public Types | |
typedef DataPoint::Scalar | Scalar |
Scalar type from DataPoint. | |
typedef DataPoint::VectorType | VectorType |
Vector type from DataPoint. | |
![]() | |
typedef DataPoint::Scalar | Scalar |
typedef DataPoint::VectorType | VectorType |
Public Member Functions | |
DistWeightFunc (const Scalar &_t=Scalar(1.)) | |
Constructor that defines the current evaluation scale. More... | |
Scalar | w (const VectorType &_q, const DataPoint &) const |
Compute the weight of the given query with respect to its coordinates. More... | |
VectorType | spacedw (const VectorType &_q, const DataPoint &) const |
First order derivative in space (for each spatial dimension \(\mathsf{x})\). More... | |
Scalar | scaledw (const VectorType &_q, const DataPoint &) const |
First order derivative in scale \(t\). More... | |
Scalar | evalScale () const |
Access to the evaluation scale set during the initialization. | |
![]() | |
Scalar | w (const VectorType &relativeQuery, const DataPoint &attributes) const |
Apply the weight function to a query. | |
VectorType | spacedw (const VectorType &relativeQuery, const DataPoint &attributes) const |
Apply the weight function differenciated in space to a query. | |
Scalar | scaledw (const VectorType &relativeQuery, const DataPoint &attributes) const |
Apply the weight function differenciated in scale to a query. | |
Scalar | evalScale () const |
Read access to the evaluation scale. | |
Protected Attributes | |
Scalar | m_t |
Evaluation scale. | |
WeightKernel | m_wk |
1D function applied to weight queries | |
|
inline |
Constructor that defines the current evaluation scale.
|
inline |
First order derivative in scale \(t\).
\( \frac{\delta \frac{\left|\mathbf{q}\right|}{t}}{\delta t} \nabla w(\frac{\left|\mathbf{q}\right|}{t}) = - \frac{\left|\mathbf{q}\right|}{t^2} \nabla{w(\frac{\left|\mathbf{q}\right|}{t})} \)
where \( \left|\mathbf{q}\right| \) represents the norm of the query coordinates expressed in centered basis.
|
inline |
First order derivative in space (for each spatial dimension \(\mathsf{x})\).
\( \frac{\delta \frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}}{\delta \mathsf{x}} \nabla w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) = \frac{ \nabla{w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t})}}{t} \)
where \( \left|\mathbf{q}_\mathsf{x}\right| \) represents the norm of the query coordinates expressed in centered basis, for each spatial dimensions \( \mathsf{x}\).
|
inline |
Compute the weight of the given query with respect to its coordinates.
As the query \(\mathbf{q}\) is expressed in a centered basis, the WeightKernel is directly applied to the norm of its coordinates with respect to the current scale \( t \) :
\( w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) \)