74 return 1 - (std::sqrt(ix * ix + iy * iy) / std::sqrt(adjX * adjX + adjY * adjY));
92 return static_cast<double>(
m_cutOff - std::abs(distance.
X()) +
m_cutOff - std::abs(distance.
Y()) + 1);
104 return static_cast<double>(adjX - std::abs(ix) + adjY - std::abs(iy) + 1);
116 throw std::runtime_error(
"NullWeighting strategy cannot be used to evaluate weights.");
125 throw std::runtime_error(
"NullWeighting strategy cannot be used to evaluate weights.");
139 throw std::invalid_argument(
"GassianWeighting 1D expects unsigned cutOff input");
142 throw std::invalid_argument(
"GassianWeighting 1D expects unsigned standard deviation input");
173 double normalisedDistanceSq = (ix * ix + iy * iy) / (adjX * adjX + adjY * adjY);
double weightAt(const double &, const double &, const double &, const double &) override
Calculate the weight at distance from epicenter.
double calculateGaussian(const double normalisedDistanceSq)
calculateGaussian method so that same gaussian calculation can be run by different consuming methods.
double weightAt(const Mantid::Kernel::V3D &) override
Calculate the weight at distance from epicenter.
double m_twiceSigmaSquared
GaussianWeightingnD(double cutOff, double sigma)
Constructor.
double weightAt(const Mantid::Kernel::V3D &) override
Calculate the weight at distance from epicenter.
LinearWeighting(const double cutOff)
Constructor.
double weightAt(const Mantid::Kernel::V3D &) override
Calculate the weight at distance from epicenter.
ParabolicWeighting(const double cutOff)
Constructor.
double weightAt(const Mantid::Kernel::V3D &) override
Implementation doesn't make sense on this type.
WeightingStrategy()
Constructor.
double m_cutOff
Cutoff member.
constexpr double X() const noexcept
Get x.
constexpr double Y() const noexcept
Get y.
double norm() const noexcept