9#include "../../Common/Assert.h"
10#include "../defines.h"
12#include PONCA_MULTIARCH_INCLUDE_CU_STD(utility)
32 template <
class _DataPo
int,
class WeightKernel>
39 using Scalar =
typename DataPoint::Scalar;
49 static constexpr bool isCompact = WeightKernel::isCompact;
100 PONCA_MULTIARCH [[nodiscard]]
inline VectorType
spacedw(
const VectorType& _q,
143 PONCA_MULTIARCH [[nodiscard]]
inline Scalar
scaledw(
const VectorType& _q,
const DataPoint& )
const
164 PONCA_MULTIARCH [[nodiscard]]
inline Scalar
scaled2w(
const VectorType& _q,
186 PONCA_MULTIARCH [[nodiscard]]
inline VectorType
scaleSpaced2w(
const VectorType& _q,
193 PONCA_MULTIARCH [[nodiscard]]
inline NeighborhoodFrame& frame() {
return *
this; }
194 PONCA_MULTIARCH [[nodiscard]]
inline const NeighborhoodFrame& frame()
const {
return *
this; }
211 template <
class _DataPo
int,
template <
typename>
typename _NeighborhoodFrame>
218 using Scalar =
typename DataPoint::Scalar;
226 using NeighborhoodFrame = _NeighborhoodFrame<DataPoint>;
232 : NeighborhoodFrame(v)
245 return {
Scalar(1), NeighborhoodFrame::convertToLocalBasis(_q.pos())};
256 return VectorType::Zero();
267 return MatrixType::Zero();
301 return VectorType::Zero();
304 PONCA_MULTIARCH [[nodiscard]]
inline NeighborhoodFrame& frame() {
return *
this; }
305 PONCA_MULTIARCH [[nodiscard]]
inline const NeighborhoodFrame& frame()
const {
return *
this; }
308 template <Prov
idesNormal DataPo
int>
309 inline constexpr typename DataPoint::VectorType ConvertDataPointToNormal(
const DataPoint& pt)
323 template <
class _DataPo
int,
typename DataType,
typename NeighborFilter, auto DataConverter>
329 using Base = NeighborFilter;
331 using Scalar =
typename DataPoint::Scalar;
344 const Scalar& _t =
Scalar(1),
const DataType& _data = DataType{})
345 : Base(_evalPos, _t),
m_data(_data)
355 : Base(_evalPoint.pos(), _t),
m_data(DataConverter(_evalPoint))
360 PONCA_MULTIARCH
inline const DataType&
data()
const {
return m_data; }
366 template <
class DataPo
int>
375 template <
class DataPo
int>
383#include "weightFilter.hpp"
NeighborhoodFrame that express 3d points relatively to a prescribed center.
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 .
MatrixType spaced2w(const VectorType &_q, const DataPoint &) const
Second order derivative in space (for each spatial dimension .
WeightKernel m_wk
1D function applied to weight queries
_DataPoint DataPoint
Alias to _DataPoint template parameter.
typename DataPoint::MatrixType MatrixType
Matrix type from DataPoint.
Scalar scaled2w(const VectorType &_q, const DataPoint &) const
Second order derivative in scale .
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()
CenteredNeighborhoodFrame< DataPoint > NeighborhoodFrame
Frame used to express the neighbors locally.
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.
VectorType scaleSpaced2w(const VectorType &_q, const DataPoint &) const
Cross derivative in scale and in space (for each spatial dimension .
static constexpr bool isCompact
Flag indicating if the weighting kernel is compact of not.
DistWeightFilter(const DataPoint &_evalPoint, const Scalar &_t=Scalar(1.))
!
WeightReturnType operator()(const DataPoint &q) const
Compute the weight of the given query with respect to its coordinates.
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.
_DataPoint DataPoint
Alias to _DataPoint template parameter.
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$.
Scalar evalScale() const
Access to the evaluation scale set during the initialization.
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...