Skip to content
Snippets Groups Projects
Commit 832bda77 authored by Anthony Lim's avatar Anthony Lim
Browse files

refs #20216 made apodization functions a namespace

parent b9f735ac
No related branches found
No related tags found
No related merge requests found
......@@ -36,10 +36,12 @@ Code Documentation is available at: <http://doxygen.mantidproject.org>
namespace Mantid {
namespace Algorithms {
namespace ApodizationFunctions {
double lorentz(double time, double decayConstant);
double gaussian(const double time, const double decayConstant);
double none(const double, const double);
}
}
}
#endif /*MANTID_APODIZATIONFUNCTIONS_H_*/
......@@ -6,6 +6,7 @@
namespace Mantid {
namespace Algorithms {
namespace ApodizationFunctions {
/**
* Returns the evaluation of the Lorentz
* (an exponential decay)
......@@ -42,3 +43,4 @@ double gaussian(const double time, const double decayConstant) {
double none(const double, const double) { return 1.; }
}
}
}
\ No newline at end of file
......@@ -134,11 +134,11 @@ typedef double (*fptr)(const double time, const double decayConstant);
*/
fptr PaddingAndApodization::getApodizationFunction(const std::string method) {
if (method == "None") {
return none;
return ApodizationFunctions::none;
} else if (method == "Lorentz") {
return lorentz;
return ApodizationFunctions::lorentz;
} else if (method == "Gaussian") {
return gaussian;
return ApodizationFunctions::gaussian;
}
throw std::invalid_argument("The apodization function selected " + method +
" is not a valid option");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment