10#include PONCA_MULTIARCH_INCLUDE_CU_STD(utility)
26template<
class DataPo
int>
30 using Scalar =
typename DataPoint::Scalar;
77template<
class DataPo
int>
81 using Scalar =
typename DataPoint::Scalar;
125template <
class DataPo
int,
class WeightKernel>
130 using Scalar =
typename DataPoint::Scalar;
140 static constexpr bool isCompact = WeightKernel::isCompact;
187 const DataPoint& )
const;
211 const DataPoint& )
const;
228 const DataPoint& )
const;
249 const DataPoint& )
const;
271 const DataPoint& )
const;
290template <
class DataPo
int,
template <
typename>
typename _NeighborhoodFrame>
295 using Scalar =
typename DataPoint::Scalar;
303 using NeighborhoodFrame = _NeighborhoodFrame<DataPoint>;
309 : NeighborhoodFrame(v){ }
317 return {
Scalar(1), NeighborhoodFrame::convertToLocalBasis(_q.pos())};
326 const DataPoint& )
const
327 {
return VectorType::Zeros(); }
335 const DataPoint& )
const
336 {
return MatrixType::Zeros(); }
343 const DataPoint& )
const
351 const DataPoint& )
const
360 const DataPoint& )
const
361 {
return VectorType::Zeros(); }
364template <
class DataPo
int>
366using NoWeightFunc = NoWeightFuncBase<DataPoint, CenteredNeighborhoodFrame>;
368template <
class DataPo
int>
370using NoWeightFuncGlobal = NoWeightFuncBase<DataPoint, GlobalNeighborhoodFrame>;
371#include "weightFunc.hpp"
NeighborhoodFrame that express 3d points relatively to a prescribed center.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
VectorType convertToGlobalBasis(const VectorType &_q) const
Convert query from local to global coordinate system, such as .
VectorType convertToLocalBasis(const VectorType &_q) const
Convert query from global to local coordinate system, such as .
void changeNeighborhoodFrame(const VectorType &_newEvalPos)
Change neighborhood frame (move basis center)
static constexpr bool hasLocalFrame
Flag indicating that this class modifies the coordinates when passing from global to local.
VectorType evalPos() const
Get access to the stored points of evaluation.
Weight neighbors according to the euclidean distance between a query and a reference position.
Scalar scaledw(const VectorType &_q, const DataPoint &) const
First order derivative in scale .
Scalar scaled2w(const VectorType &_q, const DataPoint &) const
Second order derivative in scale .
VectorType scaleSpaced2w(const VectorType &_q, const DataPoint &) const
Cross derivative in scale and in space (for each spatial dimension .
MatrixType spaced2w(const VectorType &_q, const DataPoint &) const
Second order derivative in space (for each spatial dimension .
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
DistWeightFunc(const VectorType &_evalPos=VectorType::Zero(), const Scalar &_t=Scalar(1.))
Constructor that defines the current evaluation scale.
Scalar evalScale() const
Access to the evaluation scale set during the initialization.
VectorType spacedw(const VectorType &_q, const DataPoint &) const
First order derivative in space (for each spatial dimension .
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method #w()
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
WeightReturnType operator()(const DataPoint &q) const
Compute the weight of the given query with respect to its coordinates.
WeightKernel m_wk
1D function applied to weight queries
static constexpr bool isCompact
Flag indicating if the weighting kernel is compact of not.
Scalar m_t
Evaluation scale.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
NeighborhoodFrame that keep points in the global frame without applying any transformation.
static constexpr bool hasLocalFrame
Flag indicating that this class does not modify the coordinates when passing from global to local.
const VectorType & convertToGlobalBasis(const VectorType &_q) const
Convert position from local to global coordinate system : does nothing as this is global frame.
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
void changeNeighborhoodFrame(const VectorType &)
Change neighborhood frame (has no effect for global basis)
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
const VectorType & convertToLocalBasis(const VectorType &_q) const
Convert query from global to local coordinate system : does nothing as this is global frame.
Base Weighting function that set uniform weight to all samples.
WeightReturnType operator()(const DataPoint &_q) const
Compute the weight of the given query, which is always $1$.
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
VectorType spacedw(const VectorType &, const DataPoint &) const
First order derivative in space (for each spatial dimension , which are always $0$.
Scalar scaledw(const VectorType &, const DataPoint &) const
First order derivative in scale , which are always $0$.
Scalar scaled2w(const VectorType &, const DataPoint &) const
Second order derivative in scale , which are always $0$.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method #w()
VectorType scaleSpaced2w(const VectorType &, const DataPoint &) const
Cross derivative in scale and in space (for each spatial dimension , which are always $0$.
NoWeightFuncBase(const VectorType &v=VectorType::Zero(), Scalar=0)
Default constructor.
MatrixType spaced2w(const VectorType &, const DataPoint &) const
Second order derivative in space (for each spatial dimension , which are always $0$.
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
This Source Code Form is subject to the terms of the Mozilla Public License, v.