79 virtual int operator()(
const double* x,
double* fvec) = 0;
89 virtual int df(
const double* x,
double* J) = 0;
180 virtual bool checkMinimalRTSpan(
const std::pair<double, double>& rt_bounds,
const double min_rt_span) = 0;
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
Generic LM functor with a raw-pointer interface, used to keep Eigen out of the public API.
Definition TraceFitter.h:55
virtual ~GenericFunctor()
virtual int df(const double *x, double *J)=0
Compute the Jacobian at the current parameter vector.
int values() const
Number of residuals (data points).
GenericFunctor(int dimensions, int num_data_points)
Construct with the given problem dimensions.
const int m_inputs
Definition TraceFitter.h:92
virtual int operator()(const double *x, double *fvec)=0
Compute residuals at the current parameter vector.
int inputs() const
Number of free parameters (input dimensionality).
Abstract base class for fitting an RT-shape model to one or more mass traces.
Definition TraceFitter.h:43
TraceFitter()
Default constructor; registers the "max_iteration" and "weighted" defaults on DefaultParamHandler.
virtual double getLowerRTBound() const =0
Lower RT bound of the fitted RT model.
virtual void fit(FeatureFinderAlgorithmPickedHelperStructs::MassTraces &traces)=0
Run the LM fit on traces.
FeatureFinderAlgorithmPickedHelperStructs::MassTraces * traces_ptr
Mass traces being fitted.
Definition TraceFitter.h:216
bool weighted_
Whether mass traces are weighted by theoretical intensity during fitting; refreshed from "weighted" i...
Definition TraceFitter.h:256
virtual double getHeight() const =0
Height of the fitted RT model at its centre.
bool weighted
Mirror of weighted_ at fit time.
Definition TraceFitter.h:217
virtual double getValue(double rt) const =0
Evaluate the fitted model at retention time rt.
virtual double getCenter() const =0
Centre of the fitted RT model.
virtual void getOptimizedParameters_(const std::vector< double > &s)=0
Subclass hook: copy the optimised parameter vector back into the subclass's model fields.
double computeTheoretical(const FeatureFinderAlgorithmPickedHelperStructs::MassTrace &trace, Size k) const
Evaluate the fitted model at the RT of the k-th peak of trace, scaled by the trace's theoretical inte...
void optimize_(std::vector< double > &x_init, GenericFunctor &functor)
Run Levenberg-Marquardt on functor starting from x_init.
virtual double getUpperRTBound() const =0
Upper RT bound of the fitted RT model.
TraceFitter & operator=(const TraceFitter &source)
Assignment operator.
virtual double getFWHM() const =0
Full width at half maximum of the fitted RT model.
TraceFitter(const TraceFitter &source)
Copy constructor.
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
virtual bool checkMaximalRTSpan(const double max_rt_span)=0
Whether the fitted RT model stays within max_rt_span of the extended search area.
virtual double getArea()=0
Area under the fitted RT model.
virtual std::string getGnuplotFormula(const FeatureFinderAlgorithmPickedHelperStructs::MassTrace &trace, const char function_name, const double baseline, const double rt_shift)=0
Gnuplot expression of the fitted model for trace.
SignedSize max_iterations_
Maximum number of LM iterations; refreshed from "max_iteration" in updateMembers_.
Definition TraceFitter.h:254
~TraceFitter() override
Destructor.
virtual bool checkMinimalRTSpan(const std::pair< double, double > &rt_bounds, const double min_rt_span)=0
Whether the fitted RT model covers at least min_rt_span of the extended search area.
Helper bundle passed to functors so they can read both the traces and the weighting flag.
Definition TraceFitter.h:215
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition Types.h:104
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Helper struct for mass traces used in FeatureFinderAlgorithmPicked.
Definition FeatureFinderAlgorithmPickedHelperStructs.h:54
Helper struct for a collection of mass traces used in FeatureFinderAlgorithmPicked.
Definition FeatureFinderAlgorithmPickedHelperStructs.h:85