OpenMS  2.7.0
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
OptimizePick Class Reference

This class provides the non-linear optimization of the peak parameters. More...

#include <OpenMS/TRANSFORMATIONS/RAW2PEAK/OptimizePick.h>

Collaboration diagram for OptimizePick:
[legend]

Classes

struct  Data
 
class  OptPeakFunctor
 

Public Types

typedef std::vector< Peak1DRawDataVector
 Profile data vector type. More...
 
typedef RawDataVector::iterator PeakIterator
 Profile data iterator type. More...
 

Public Member Functions

 OptimizePick ()
 Constructor. More...
 
 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 threshold for the absolute and the relative error. More...
 
 ~OptimizePick ()
 Destructor. More...
 
const struct OptimizationFunctions::PenaltyFactorsgetPenalties () const
 Non-mutable access to the penalty factors. More...
 
struct OptimizationFunctions::PenaltyFactorsgetPenalties ()
 Mutable access to the penalty factors. More...
 
void setPenalties (const struct OptimizationFunctions::PenaltyFactors &penalties)
 Mutable access to the penalty factors. More...
 
UInt getNumberIterations () const
 Non-mutable access to the number of iterations. More...
 
unsigned int & getNumberIterations ()
 Mutable access to the number of iterations. More...
 
void setNumberIterations (const int max_iteration)
 Mutable access to the number of iterations. More...
 
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 optimized peak shapes. More...
 

Protected Attributes

struct OptimizationFunctions::PenaltyFactors penalties_
 Penalty factors. More...
 
unsigned int max_iteration_
 Maximum number of iterations during optimization. More...
 

Detailed Description

This class provides the non-linear optimization of the peak parameters.

Given a vector of peak shapes, this class optimizes all peak shapes parameters using a non-linear optimization. For the non-linear optimization we use the Levenberg-Marquardt algorithm provided by the Eigen.


Class Documentation

◆ OpenMS::OptimizePick::Data

struct OpenMS::OptimizePick::Data
Collaboration diagram for OptimizePick::Data:
[legend]
Class Members
vector< PeakShape > peaks This container contains the peak shapes to be optimized.
PenaltyFactors penalties
vector< double > positions Positions and intensity values of the profile data.
vector< double > signal

Member Typedef Documentation

◆ PeakIterator

typedef RawDataVector::iterator PeakIterator

Profile data iterator type.

◆ RawDataVector

typedef std::vector<Peak1D> RawDataVector

Profile data vector type.

Constructor & Destructor Documentation

◆ OptimizePick() [1/2]

OptimizePick ( )
inline

Constructor.

◆ OptimizePick() [2/2]

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 threshold for the absolute and the relative error.

◆ ~OptimizePick()

Destructor.

Member Function Documentation

◆ getNumberIterations() [1/2]

unsigned int& getNumberIterations ( )
inline

Mutable access to the number of iterations.

◆ getNumberIterations() [2/2]

UInt getNumberIterations ( ) const
inline

Non-mutable access to the number of iterations.

◆ getPenalties() [1/2]

struct OptimizationFunctions::PenaltyFactors& getPenalties ( )
inline

Mutable access to the penalty factors.

◆ getPenalties() [2/2]

const struct OptimizationFunctions::PenaltyFactors& getPenalties ( ) const
inline

Non-mutable access to the penalty factors.

◆ optimize()

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 optimized peak shapes.

Referenced by TwoDOptimization::optimizeRegionsScanwise_().

◆ setNumberIterations()

void setNumberIterations ( const int  max_iteration)
inline

Mutable access to the number of iterations.

◆ setPenalties()

void setPenalties ( const struct OptimizationFunctions::PenaltyFactors penalties)
inline

Mutable access to the penalty factors.

Member Data Documentation

◆ max_iteration_

unsigned int max_iteration_
protected

Maximum number of iterations during optimization.

◆ penalties_

struct OptimizationFunctions::PenaltyFactors penalties_
protected

Penalty factors.