41 #include <unsupported/Eigen/NonLinearOptimization>
47 namespace OptimizationFunctions
65 pos(0), lWidth(0), rWidth(0) {}
67 pos(p.pos), lWidth(p.lWidth), rWidth(p.rWidth) {}
118 : m_inputs(dimensions), m_values(num_data_points), m_data(data) {}
120 int operator()(
const Eigen::VectorXd &x, Eigen::VectorXd &fvec);
122 int df(
const Eigen::VectorXd &x, Eigen::MatrixXd &J);
142 const int max_iteration_);
Definition: OptimizePick.h:112
OptPeakFunctor(unsigned dimensions, unsigned num_data_points, const OptimizePick::Data *data)
Definition: OptimizePick.h:117
int values() const
Definition: OptimizePick.h:115
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &J)
const Data * m_data
Definition: OptimizePick.h:126
const int m_inputs
Definition: OptimizePick.h:125
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec)
int inputs() const
Definition: OptimizePick.h:114
This class provides the non-linear optimization of the peak parameters.
Definition: OptimizePick.h:96
void setNumberIterations(const int max_iteration)
Mutable access to the number of iterations.
Definition: OptimizePick.h:159
void setPenalties(const struct OptimizationFunctions::PenaltyFactors &penalties)
Mutable access to the penalty factors.
Definition: OptimizePick.h:152
std::vector< Peak1D > RawDataVector
Profile data vector type.
Definition: OptimizePick.h:130
OptimizationFunctions::PenaltyFactors penalties
Definition: OptimizePick.h:107
OptimizePick()
Constructor.
Definition: OptimizePick.h:136
RawDataVector::iterator PeakIterator
Profile data iterator type.
Definition: OptimizePick.h:132
unsigned int max_iteration_
Maximum number of iterations during optimization.
Definition: OptimizePick.h:170
std::vector< double > positions
Positions and intensity values of the profile data.
Definition: OptimizePick.h:102
OptimizePick(const struct OptimizationFunctions::PenaltyFactors &penalties_, const int max_iteration_)
Constructor to set the penalty factors, the number of optimization iterations as well as the threshol...
unsigned int & getNumberIterations()
Mutable access to the number of iterations.
Definition: OptimizePick.h:157
struct OptimizationFunctions::PenaltyFactors & getPenalties()
Mutable access to the penalty factors.
Definition: OptimizePick.h:150
std::vector< PeakShape > peaks
This container contains the peak shapes to be optimized.
Definition: OptimizePick.h:105
const struct OptimizationFunctions::PenaltyFactors & getPenalties() const
Non-mutable access to the penalty factors.
Definition: OptimizePick.h:148
~OptimizePick()
Destructor.
void optimize(std::vector< PeakShape > &peaks, Data &data)
Start the optimization of the peak shapes peaks. The original peak shapes will be substituted by the ...
UInt getNumberIterations() const
Non-mutable access to the number of iterations.
Definition: OptimizePick.h:155
std::vector< double > signal
Definition: OptimizePick.h:103
Definition: OptimizePick.h:100
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
std::vector< Peak1D > RawDataVector
Profile data vector type.
Definition: OptimizePick.h:50
RawDataVector::iterator PeakIterator
Profile data iterator type.
Definition: OptimizePick.h:52
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Class for the penalty factors used during the optimization.
Definition: OptimizePick.h:63
double rWidth
Penalty factor for the peak shape's right width parameter.
Definition: OptimizePick.h:84
double pos
Penalty factor for the peak shape's position.
Definition: OptimizePick.h:80
PenaltyFactors()
Definition: OptimizePick.h:64
double lWidth
Penalty factor for the peak shape's left width parameter.
Definition: OptimizePick.h:82
PenaltyFactors & operator=(const PenaltyFactors &p)
Definition: OptimizePick.h:68
PenaltyFactors(const PenaltyFactors &p)
Definition: OptimizePick.h:66
~PenaltyFactors()
Definition: OptimizePick.h:77