36 #ifndef OPENMS_FILTERING_SMOOTHING_FASTLOWESSSMOOTHING_H 37 #define OPENMS_FILTERING_SMOOTHING_FASTLOWESSSMOOTHING_H 64 namespace FastLowessSmoothing
102 int OPENMS_DLLAPI
lowess(
const std::vector<double>& x,
const std::vector<double>& y,
103 double f,
int nsteps,
double delta, std::vector<double>& result);
117 inline int OPENMS_DLLAPI
lowess(
const std::vector<double>& x,
const std::vector<double>& y,
118 std::vector<double>& result)
122 OPENMS_PRECONDITION(std::adjacent_find(x.begin(), x.end(), std::greater<double>()) == x.end(),
123 "The vector x needs to be sorted")
125 double delta = 0.01 * (x[ x.size()-1 ] - x[0]);
126 return lowess(x, y, 2.0/3, 3, delta, result);
131 #endif // OPENMS_FILTERING_SMOOTHING_FASTLOWESSSMOOTHING_H #define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:107
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
int lowess(const std::vector< double > &x, const std::vector< double > &y, double f, int nsteps, double delta, std::vector< double > &result)
Computes a lowess smoothing fit on the input vectors.