21 #ifndef otbPointSetDensityEpanechnikovFunction_hxx
22 #define otbPointSetDensityEpanechnikovFunction_hxx
32 template <
class TPo
intSet,
class TOutput>
37 double radiussq = m_Radius * m_Radius;
39 if (this->GetPointSet()->GetNumberOfPoints() != 0)
41 typedef typename TPointSet::PointsContainer::ConstIterator iteratorType;
42 iteratorType it = this->GetPointSet()->GetPoints()->Begin();
44 while (it != this->GetPointSet()->GetPoints()->End())
46 float distX = input[0] - it.Value()[0];
47 float distY = input[1] - it.Value()[1];
48 float distsq = distX * distX + distY * distY;
50 if (distsq < radiussq)
52 accu += 0.75 * (1 - distsq / radiussq);
64 template <
class TPo
intSet,
class TOutput>
67 this->Superclass::PrintSelf(os, indent);