Go to the documentation of this file. 1 #ifndef __GfxTL_WEIGHTFUNC_HEADER__
2 #define __GfxTL_WEIGHTFUNC_HEADER__
9 template<
class ScalarT >
27 return EvalBSpline(_f * dist);
58 template<
class Po
int >
96 template<
class Po
intT >
127 template<
class Po
intT >
155 return std::exp(-sqrDist) / sqrDist;
161 ScalarType sqrDist = _scale * _center.SqrDistance(x);
166 *weight = std::exp(-sqrDist) / sqrDist;
167 for (
unsigned int i = 0; i < PointType::Dim; ++i)
169 (*derivative)[i] = *weight * (2 * (x[i] - _center[i]));
170 (*derivative)[i] += (*derivative)[i] / sqrDist;
180 template<
class Po
intT >
189 , _sqrRadius(_radius * _radius)
190 , _cbcRadius(_sqrRadius * _radius)
197 , _sqrRadius(_radius * _radius)
198 , _cbcRadius(_sqrRadius * _radius)
209 return 2 * sqrDist * dist / _cbcRadius -
210 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)
bool WeightAndDerivative(const PointType &x, ScalarType *weight, PointType *derivative)
static ScalarT Max(ScalarT a, ScalarT b)