OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Migrad.h
Go to the documentation of this file.
1 #ifndef OPAL_Migrad_HH
2 #define OPAL_Migrad_HH 1
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: Migrad.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: Migrad
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:33:44 $
17 // $Author: Andreas Adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "AbstractObjects/Action.h"
22 #include "Match/MatchState.h"
23 
24 template <class T> class Matrix;
25 template <class T> class Vector;
26 
27 
28 // Class Migrad
29 // ------------------------------------------------------------------------
31 // This class encapsulates a minimisation according to the MIGRAD method,
32 // Minimization by a gradient method due to Davidon/Fletcher/Powell
33 // (Computer Journal 13, 317, 1970). Also described in
34 // [center]
35 // J. F. Bonnans et al., Optimisation Numerique, pp. 44-46.
36 // Springer, Berlin, 1997
37 // [/center]
38 // Algorithm rewritten following the MINUIT package.
39 
40 class Migrad: public Action {
41 
42 public:
43 
45  Migrad();
46 
47  virtual ~Migrad();
48 
50  virtual Migrad *clone(const std::string &name);
51 
53  virtual void execute();
54 
55 private:
56 
57  // Not implemented.
58  Migrad(const Migrad &);
59  void operator=(const Migrad &);
60 
61  // Clone constructor.
62  Migrad(const std::string &name, Migrad *parent);
63 
64  // Find covariance matrix.
67 
68  // Find first and second derivatives.
71 
72  // Search for minimum along a line.
74  (Vector<double> &X, Vector<double> &dX, Vector<double> &F, double tol);
75 
76  // Force symmetric matrix positive definite.
78 
79  // Invert symmetric matrix.
81 
82  // Find real eigenvalues of a symmetric matrix.
83  int symmetricEigen(const Matrix<double> &A, Vector<double> &eigen);
84 
85  // The sum of squares of the matching functions (local copy).
86  double fmin;
87 };
88 
89 #endif // OPAL_Migrad_HH
void hessenberg(Vector< double > &X, Vector< double > &F, Matrix< double > &V, Vector< double > &G, Vector< double > &G2)
Definition: Migrad.cpp:250
virtual void execute()
Execute the command.
Definition: Migrad.cpp:76
void operator=(const Migrad &)
int symmetricEigen(const Matrix< double > &A, Vector< double > &eigen)
Definition: Migrad.cpp:507
MatchState lineSearch(Vector< double > &X, Vector< double > &dX, Vector< double > &F, double tol)
Definition: Migrad.cpp:337
MatchState
The possible states of a matching process.
Definition: MatchState.h:29
bool invertSymmetric(Matrix< double > &A)
Definition: Migrad.cpp:621
The base class for all OPAL actions.
Definition: Action.h:30
Definition: rbendmap.h:8
virtual Migrad * clone(const std::string &name)
Make clone.
Definition: Migrad.cpp:71
The MIGRAD command.
Definition: Migrad.h:40
void derivatives(Vector< double > &X, Vector< double > &F, Vector< double > &G, Vector< double > &G2)
Definition: Migrad.cpp:304
virtual ~Migrad()
Definition: Migrad.cpp:67
void forcePositiveDefinite(Matrix< double > &A)
Definition: Migrad.cpp:674
Migrad()
Exemplar constructor.
Definition: Migrad.cpp:49
const std::string name
Matrix.
Definition: Matrix.h:38
Vector.
double fmin
Definition: Migrad.h:86