9#include "../../Common/Assert.h"
10#include "../defines.h"
12#include PONCA_MULTIARCH_INCLUDE_CU_STD(utility)
32 template <
class _DataPo
int,
class WeightKernel>
49 static constexpr bool isCompact = WeightKernel::isCompact;
191 PONCA_MULTIARCH [[nodiscard]]
inline const NeighborhoodFrame& frame()
const {
return *
this; }
208 template <
class _DataPo
int,
template <
typename>
typename _NeighborhoodFrame>
242 return {
Scalar(1), NeighborhoodFrame::convertToLocalBasis(
_q.pos())};
253 return VectorType::Zeros();
264 return MatrixType::Zeros();
295 return VectorType::Zeros();
298 PONCA_MULTIARCH [[
nodiscard]]
inline NeighborhoodFrame& frame() {
return *
this; }
299 PONCA_MULTIARCH [[
nodiscard]]
inline const NeighborhoodFrame& frame()
const {
return *
this; }
302 template <
typename DataPo
int>
303 inline constexpr typename DataPoint::VectorType ConvertDataPointToNormal(
const DataPoint& pt)
317 template <
class _DataPo
int,
typename DataType,
typename NeighborFilter, auto DataConverter>
323 using Base = NeighborFilter;
360 template <
class DataPo
int>
369 template <
class DataPo
int>
377#include "weightFilter.hpp"
Aggregator class used to declare specialized structures using CRTP.
typename P::Scalar Scalar
Scalar type used for computation, as defined from template parameter P
NeighborhoodFrame that express 3d points relatively to a prescribed center.
Weight neighbors according to the Euclidean distance between a query and a reference position.
WeightKernel m_wk
1D function applied to weight queries
_DataPoint DataPoint
Alias to _DataPoint template parameter.
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method #w()
CenteredNeighborhoodFrame< DataPoint > NeighborhoodFrame
Frame used to express the neighbors locally.
Scalar scaledw(const VectorType &_q, const DataPoint &) const
First order derivative in scale .
Scalar m_t
Evaluation scale.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
DistWeightFilter(const VectorType &_evalPos=VectorType::Zero(), const Scalar &_t=Scalar(1.))
Constructor that defines the current evaluation scale.
static constexpr bool isCompact
Flag indicating if the weighting kernel is compact of not.
Scalar scaled2w(const VectorType &_q, const DataPoint &) const
Second order derivative in scale .
DistWeightFilter(const DataPoint &_evalPoint, const Scalar &_t=Scalar(1.))
!
MatrixType spaced2w(const VectorType &_q, const DataPoint &) const
Second order derivative in space (for each spatial dimension .
WeightReturnType operator()(const DataPoint &q) const
Compute the weight of the given query with respect to its coordinates.
VectorType scaleSpaced2w(const VectorType &_q, const DataPoint &) const
Cross derivative in scale and in space (for each spatial dimension .
VectorType spacedw(const VectorType &_q, const DataPoint &) const
First order derivative in space (for each spatial dimension .
Scalar evalScale() const
Access to the evaluation scale set during the initialization.
This class extends a NeighborFilter class to also store additional data, for use outside the scope of...
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
FilterWithAttributes(const DataPoint &_evalPoint, const Scalar &_t=Scalar(0))
Constructor that defines the current evaluation scale and construct the DataType from the _evalPoint ...
FilterWithAttributes(const VectorType &_evalPos=VectorType::Zero(), const Scalar &_t=Scalar(1), const DataType &_data=DataType{})
Constructor that defines the current evaluation scale.
DataType m_data
Evaluation normal.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method #w()
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
const DataType & data() const
Access to the evaluation normal set during the initialization.
NeighborhoodFrame that keep points in the global frame without applying any transformation This class...
Weighting function that set uniform weight to all samples.
Scalar scaled2w(const VectorType &, const DataPoint &) const
Second order derivative in scale , which are always $0$.
typename DataPoint::Scalar Scalar
Scalar type from DataPoint.
std::pair< Scalar, VectorType > WeightReturnType
Return type of the method #w()
Scalar scaledw(const VectorType &, const DataPoint &) const
First order derivative in scale , which are always $0$.
typename DataPoint::VectorType VectorType
Vector type from DataPoint.
VectorType spacedw(const VectorType &, const DataPoint &) const
First order derivative in space (for each spatial dimension , which are always $0$.
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
NoWeightFilterBase(const DataPoint &v, Scalar=0)
!
VectorType scaleSpaced2w(const VectorType &, const DataPoint &) const
Cross derivative in scale and in space (for each spatial dimension , which are always $0$.
WeightReturnType operator()(const DataPoint &_q) const
Compute the weight of the given query, which is always $1$.
MatrixType spaced2w(const VectorType &, const DataPoint &) const
Second order derivative in space (for each spatial dimension , which are always $0$.
DataPoint DataPoint
Alias to _DataPoint template parameter.
NoWeightFilterBase(const VectorType &v=VectorType::Zero(), Scalar=0)
Default constructor.
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Weighting function that set uniform weight to all samples and keep neighbors coordinates in global fr...
Weighting function that set uniform weight to all samples, but transform neighbors coordinates to loc...