35 #ifndef OPENMS_TRANSFORMATIONS_RAW2PEAK_OPTIMIZEPICK_H 36 #define OPENMS_TRANSFORMATIONS_RAW2PEAK_OPTIMIZEPICK_H 42 #include <unsupported/Eigen/NonLinearOptimization> 48 namespace OptimizationFunctions
66 pos(0), lWidth(0), rWidth(0) {}
68 pos(p.pos), lWidth(p.lWidth), rWidth(p.rWidth) {}
119 : m_inputs(dimensions), m_values(num_data_points), m_data(data) {}
121 int operator()(
const Eigen::VectorXd &x, Eigen::VectorXd &fvec);
123 int df(
const Eigen::VectorXd &x, Eigen::MatrixXd &J);
143 const int max_iteration_);
163 void optimize(std::vector<PeakShape> & peaks,
Data & data);
std::vector< double > positions
Positions and intensity values of the raw data.
Definition: OptimizePick.h:103
unsigned int max_iteration_
Maximum number of iterations during optimization.
Definition: OptimizePick.h:171
Definition: OptimizePick.h:100
void setNumberIterations(const int max_iteration)
Mutable access to the number of iterations.
Definition: OptimizePick.h:160
OptimizePick()
Constructor.
Definition: OptimizePick.h:137
~PenaltyFactors()
Definition: OptimizePick.h:78
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
PenaltyFactors & operator=(const PenaltyFactors &p)
Definition: OptimizePick.h:69
OptimizationFunctions::PenaltyFactors penalties
Definition: OptimizePick.h:108
PenaltyFactors(const PenaltyFactors &p)
Definition: OptimizePick.h:67
const Data * m_data
Definition: OptimizePick.h:127
std::vector< Peak1D > RawDataVector
Raw data vector type.
Definition: OptimizePick.h:51
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
double lWidth
Penalty factor for the peak shape's left width parameter.
Definition: OptimizePick.h:83
RawDataVector::iterator PeakIterator
Raw data iterator type.
Definition: OptimizePick.h:53
std::vector< PeakShape > peaks
This container contains the peak shapes to be optimized.
Definition: OptimizePick.h:106
const struct OptimizationFunctions::PenaltyFactors & getPenalties() const
Non-mutable access to the penalty factors.
Definition: OptimizePick.h:149
int inputs() const
Definition: OptimizePick.h:115
const int m_values
Definition: OptimizePick.h:126
double pos
Penalty factor for the peak shape's position.
Definition: OptimizePick.h:81
OptPeakFunctor(unsigned dimensions, unsigned num_data_points, const OptimizePick::Data *data)
Definition: OptimizePick.h:118
unsigned int & getNumberIterations()
Mutable access to the number of iterations.
Definition: OptimizePick.h:158
double rWidth
Penalty factor for the peak shape's right width parameter.
Definition: OptimizePick.h:85
Definition: OptimizePick.h:112
Class for the penalty factors used during the optimization.
Definition: OptimizePick.h:63
std::vector< double > signal
Definition: OptimizePick.h:104
RawDataVector::iterator PeakIterator
Raw data iterator type.
Definition: OptimizePick.h:133
int values() const
Definition: OptimizePick.h:116
This class provides the non-linear optimization of the peak parameters.
Definition: OptimizePick.h:96
struct OptimizationFunctions::PenaltyFactors & getPenalties()
Mutable access to the penalty factors.
Definition: OptimizePick.h:151
void setPenalties(const struct OptimizationFunctions::PenaltyFactors &penalties)
Mutable access to the penalty factors.
Definition: OptimizePick.h:153
PenaltyFactors()
Definition: OptimizePick.h:65
std::vector< Peak1D > RawDataVector
Raw data vector type.
Definition: OptimizePick.h:131
UInt getNumberIterations() const
Non-mutable access to the number of iterations.
Definition: OptimizePick.h:156