1#ifndef __GfxTL_WEIGHTFUNC_HEADER__
2#define __GfxTL_WEIGHTFUNC_HEADER__
10 template <
class ScalarT>
29 return EvalBSpline(_f * dist);
60 template <
class Po
int>
102 template <
class Po
intT>
110 _center(center), _radius(radius)
133 template <
class Po
intT>
162 return std::exp(-sqrDist) / sqrDist;
168 ScalarType sqrDist = _scale * _center.SqrDistance(
x);
173 *weight = std::exp(-sqrDist) / sqrDist;
174 for (
unsigned int i = 0; i < PointType::Dim; ++i)
176 (*derivative)[i] = *weight * (2 * (
x[i] - _center[i]));
177 (*derivative)[i] += (*derivative)[i] / sqrDist;
187 template <
class Po
intT>
195 _radius(radius), _sqrRadius(_radius * _radius), _cbcRadius(_sqrRadius * _radius)
202 _sqrRadius(_radius * _radius),
203 _cbcRadius(_sqrRadius * _radius)
217 return 2 * sqrDist * dist / _cbcRadius - 3 * sqrDist / _sqrRadius + 1;
BSplineWeightFunc(ScalarType r)
ScalarType operator()(ScalarType dist) const
PointType::ScalarType ScalarType
bool WeightAndDerivative(const PointType &x, ScalarType *weight, PointType *derivative)
CubicGaussApproximationWeightFunc(ScalarType radius)
ScalarType operator()(ScalarType dist) const
ScalarType operator()(const PointType &p) const
CubicGaussApproximationWeightFunc(PointType center, ScalarType radius)
PointType::ScalarType ScalarType
InterpolatingExponentialWeightFunc(const PointType ¢er, ScalarType sqrRadius)
bool WeightAndDerivative(const PointType &x, ScalarType *weight, PointType *derivative)
ScalarType operator()(ScalarType sqrDist) const
InterpolatingExponentialWeightFunc()
ScalarType operator()(const PointType &p) const
PointType::ScalarType ScalarType
InverseDistanceSingularWeightFunc(const PointType ¢er, ScalarType radius)
ScalarType operator()(const PointType &p) const
ScalarType operator()(ScalarType d) const
static ScalarT Max(ScalarT a, ScalarT b)
double Weight(const Point &)
Point::ScalarType ScalarType
double operator()(const Point &)
std::forward_iterator_tag iterator_category
UnitWeightIterator operator++() const
const unsigned int operator*() const
This file offers overloads of toIce() and fromIce() functions for STL container types.