Go to the documentation of this file. 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;
ScalarType operator()(ScalarType dist) const
double Weight(const Point &)
PointType::ScalarType ScalarType
bool WeightAndDerivative(const PointType &x, ScalarType *weight, PointType *derivative)
InterpolatingExponentialWeightFunc(const PointType ¢er, ScalarType sqrRadius)
InverseDistanceSingularWeightFunc(const PointType ¢er, ScalarType radius)
BSplineWeightFunc(ScalarType r)
CubicGaussApproximationWeightFunc(PointType center, ScalarType radius)
ScalarType operator()(ScalarType sqrDist) const
PointType::ScalarType ScalarType
double operator()(const Point &)
ScalarType operator()(const PointType &p) const
double a(double t, double a0, double j)
ScalarType operator()(const PointType &p) const
ScalarType operator()(const PointType &p) const
InterpolatingExponentialWeightFunc()
const unsigned int operator*() const
Point::ScalarType ScalarType
UnitWeightIterator operator++() const
ScalarType operator()(ScalarType dist) const
std::forward_iterator_tag iterator_category
ScalarType operator()(ScalarType d) const
PointType::ScalarType ScalarType
CubicGaussApproximationWeightFunc(ScalarType radius)
state::Type center(state::Type previous)
bool WeightAndDerivative(const PointType &x, ScalarType *weight, PointType *derivative)
static ScalarT Max(ScalarT a, ScalarT b)
This file offers overloads of toIce() and fromIce() functions for STL container types.