MnSimplex.h

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: MnSimplex.h 21530 2007-12-20 11:14:35Z moneta $
00002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005  
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
00007  *                                                                    *
00008  **********************************************************************/
00009 
00010 #ifndef ROOT_Minuit2_MnSimplex
00011 #define ROOT_Minuit2_MnSimplex
00012 
00013 #include "Minuit2/MnApplication.h"
00014 #include "Minuit2/SimplexMinimizer.h"
00015 
00016 namespace ROOT {
00017 
00018    namespace Minuit2 {
00019 
00020 
00021 class FCNBase;
00022 
00023 //_________________________________________________________________________
00024 /** 
00025     API class for minimization using the Simplex method, which does not need and use 
00026     the derivatives of the function, but only function values. 
00027     More information on the minimization method is available 
00028     <A HREF="http://seal.web.cern.ch/mathlibs/documents/minuit/mntutorial.pdf">here</A>.
00029     
00030     It allows for user interaction: set/change parameters, do minimization,
00031     change parameters, re-do minimization etc.; 
00032  */
00033 
00034 class MnSimplex : public MnApplication {
00035 
00036 public:
00037 
00038    /// construct from FCNBase + std::vector for parameters and errors
00039    MnSimplex(const FCNBase& fcn, const std::vector<double>& par, const std::vector<double>& err, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par,err), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
00040 
00041    /// construct from FCNBase + std::vector for parameters and covariance
00042    MnSimplex(const FCNBase& fcn, const std::vector<double>& par, unsigned int nrow, const std::vector<double>& cov,  unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov, nrow), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
00043 
00044    /// construct from FCNBase + std::vector for parameters and MnUserCovariance
00045    MnSimplex(const FCNBase& fcn, const std::vector<double>& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
00046 
00047    /// construct from FCNBase + MnUserParameters
00048    MnSimplex(const FCNBase& fcn, const MnUserParameters& par, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
00049 
00050    /// construct from FCNBase + MnUserParameters + MnUserCovariance
00051    MnSimplex(const FCNBase& fcn, const MnUserParameters& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(SimplexMinimizer()) {}
00052 
00053    /// construct from FCNBase + MnUserParameterState + MnStrategy
00054    MnSimplex(const FCNBase& fcn, const MnUserParameterState& par, const MnStrategy& str) : MnApplication(fcn, MnUserParameterState(par), str), fMinimizer(SimplexMinimizer()) {}
00055 
00056    MnSimplex(const MnSimplex& migr) : MnApplication(migr.Fcnbase(), migr.State(), migr.Strategy(), migr.NumOfCalls()), fMinimizer(migr.fMinimizer) {}  
00057 
00058    ~MnSimplex() {}
00059 
00060    const ModularFunctionMinimizer& Minimizer() const {return fMinimizer;}
00061 
00062 private:
00063 
00064    SimplexMinimizer fMinimizer;
00065 
00066 private:
00067 
00068    //forbidden assignment of migrad (const FCNBase& = )
00069    MnSimplex& operator=(const MnSimplex&) {return *this;}
00070 };
00071 
00072   }  // namespace Minuit2
00073 
00074 }  // namespace ROOT
00075 
00076 #endif  // ROOT_Minuit2_MnSimplex

Generated on Tue Jul 5 14:25:45 2011 for ROOT_528-00b_version by  doxygen 1.5.1