Logo ROOT  
Reference Guide
GSLSimAnMinimizer.h
Go to the documentation of this file.
1 // @(#)root/mathmore:$Id$
2 // Author: L. Moneta Wed Dec 20 17:16:32 2006
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU General Public License *
10  * as published by the Free Software Foundation; either version 2 *
11  * of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this library (see file COPYING); if not, write *
20  * to the Free Software Foundation, Inc., 59 Temple Place, Suite *
21  * 330, Boston, MA 02111-1307 USA, or contact the author. *
22  * *
23  **********************************************************************/
24 
25 // Header file for class GSLSimAnMinimizer
26 
27 #ifndef ROOT_Math_GSLSimAnMinimizer
28 #define ROOT_Math_GSLSimAnMinimizer
29 
30 
31 
32 #include "Math/BasicMinimizer.h"
33 
34 
35 #include "Math/IFunctionfwd.h"
36 
37 #include "Math/IParamFunctionfwd.h"
38 
39 
40 
41 #include "Math/GSLSimAnnealing.h"
42 
43 
44 
45 
46 namespace ROOT {
47 
48  namespace Math {
49 
50 
51 
52 //_____________________________________________________________________________________
53 /**
54  GSLSimAnMinimizer class for minimization using simulated annealing
55  using the algorithm from
56  <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Simulated-Annealing.html">
57  GSL</A>.
58  It implements the ROOT::Minimizer interface and
59  a plug-in (name "GSLSimAn") exists to instantiate this class via the plug-in manager
60 
61  @ingroup MultiMin
62 */
63 class GSLSimAnMinimizer : public ROOT::Math::BasicMinimizer {
64 
65 public:
66 
67  /**
68  Default constructor
69  */
70  GSLSimAnMinimizer (int type = 0);
71 
72  /**
73  Destructor (no operations)
74  */
75  virtual ~GSLSimAnMinimizer ();
76 
77 private:
78  // usually copying is non trivial, so we make this unaccessible
79 
80  /**
81  Copy constructor
82  */
84 
85  /**
86  Assignment operator
87  */
89  if (this == &rhs) return *this; // time saving self-test
90  return *this;
91  }
92 
93 public:
94 
95 
96  /// method to perform the minimization
97  virtual bool Minimize();
98 
99  /// number of calls
100  unsigned int NCalls() const;
101 
102  /// Get current minimizer options
103  virtual ROOT::Math::MinimizerOptions Options() const;
104 
105  /// Get current minimizer option parameteres
106  const GSLSimAnParams & MinimizerParameters() const { return fSolver.Params(); }
107 
108 
109  /// set new minimizer options
110  virtual void SetOptions(const ROOT::Math::MinimizerOptions & opt);
111 
112  /// set new minimizer option parameters using directly the GSLSimAnParams structure
113  void SetParameters(const GSLSimAnParams & params ) { fSolver.SetParams(params); }
114 
115 protected:
116 
117 private:
118 
119 
121 
122 
123 };
124 
125  } // end namespace Math
126 
127 } // end namespace ROOT
128 
129 
130 #endif /* ROOT_Math_GSLSimAnMinimizer */
ROOT::Math::GSLSimAnMinimizer::GSLSimAnMinimizer
GSLSimAnMinimizer(int type=0)
Default constructor.
Definition: GSLSimAnMinimizer.cxx:43
ROOT::Math::GSLSimAnnealing::Params
GSLSimAnParams & Params()
Definition: GSLSimAnnealing.h:277
ROOT::Math::GSLSimAnMinimizer::Minimize
virtual bool Minimize()
method to perform the minimization
Definition: GSLSimAnMinimizer.cxx:56
IFunctionfwd.h
ROOT::Math::GSLSimAnMinimizer::SetParameters
void SetParameters(const GSLSimAnParams &params)
set new minimizer option parameters using directly the GSLSimAnParams structure
Definition: GSLSimAnMinimizer.h:170
ROOT::Math::GSLSimAnMinimizer::SetOptions
virtual void SetOptions(const ROOT::Math::MinimizerOptions &opt)
set new minimizer options
Definition: GSLSimAnMinimizer.cxx:166
ROOT::Math::GSLSimAnParams
structure holding the simulated annealing parameters
Definition: GSLSimAnnealing.h:199
ROOT::Math::BasicMinimizer
Base Minimizer class, which defines the basic funcionality of various minimizer implementations (apar...
Definition: BasicMinimizer.h:64
ROOT::Math::GSLSimAnnealing
GSLSimAnnealing class for performing a simulated annealing search of a multidimensional function.
Definition: GSLSimAnnealing.h:231
ROOT::Math::GSLSimAnMinimizer::operator=
GSLSimAnMinimizer & operator=(const GSLSimAnMinimizer &rhs)
Assignment operator.
Definition: GSLSimAnMinimizer.h:145
GSLSimAnnealing.h
ROOT::Math::GSLSimAnMinimizer::~GSLSimAnMinimizer
virtual ~GSLSimAnMinimizer()
Destructor (no operations)
Definition: GSLSimAnMinimizer.cxx:52
ROOT::Math::BasicMinimizer::BasicMinimizer
BasicMinimizer()
Default constructor.
Definition: BasicMinimizer.cxx:53
ROOT::Math::GSLSimAnMinimizer::fSolver
ROOT::Math::GSLSimAnnealing fSolver
Definition: GSLSimAnMinimizer.h:177
ROOT::Math::GSLSimAnnealing::SetParams
void SetParams(const GSLSimAnParams &params)
Definition: GSLSimAnnealing.h:279
ROOT::Math::MinimizerOptions
Minimizer options.
Definition: MinimizerOptions.h:42
ROOT::Math::GSLSimAnMinimizer::MinimizerParameters
const GSLSimAnParams & MinimizerParameters() const
Get current minimizer option parameteres.
Definition: GSLSimAnMinimizer.h:163
IParamFunctionfwd.h
BasicMinimizer.h
type
int type
Definition: TGX11.cxx:121
ROOT::Math::GSLSimAnMinimizer::NCalls
unsigned int NCalls() const
number of calls
Definition: GSLSimAnMinimizer.cxx:127
ROOT
VSD Structures.
Definition: StringConv.hxx:21
Math
ROOT::Math::GSLSimAnMinimizer::Options
virtual ROOT::Math::MinimizerOptions Options() const
Get current minimizer options.
Definition: GSLSimAnMinimizer.cxx:138