Logo ROOT   6.10/09
Reference Guide
GenericFunction.h
Go to the documentation of this file.
1 // @(#)root/minuit2:$Id$
2 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7  * *
8  **********************************************************************/
9 
10 #ifndef ROOT_Minuit2_GenericFunction
11 #define ROOT_Minuit2_GenericFunction
12 
13 #include "Minuit2/MnConfig.h"
14 
15 #include <vector>
16 
17 namespace ROOT {
18 
19  namespace Minuit2 {
20 
21 
22 //_____________________________________________________________________
23 /**
24 
25 Class from which all the other classes, representing functions,
26 inherit. That is why it defines only one method, the operator(),
27 which allows to call the function.
28 
29 @author Andras Zsenei and Lorenzo Moneta, Creation date: 23 Sep 2004
30 
31 @ingroup Minuit
32 
33  */
34 
36 
37 public:
38 
39  virtual ~GenericFunction() {}
40 
41 
42  /**
43 
44  Evaluates the function using the vector containing the input values.
45 
46  @param x vector of the coordinates (for example the x coordinate for a
47  one-dimensional Gaussian)
48 
49  @return the result of the evaluation of the function.
50 
51  */
52 
53  virtual double operator()(const std::vector<double>& x) const=0;
54 
55 
56 
57 };
58 
59  } // namespace Minuit2
60 
61 } // namespace ROOT
62 
63 #endif // ROOT_Minuit2_GenericFunction
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
Double_t x[n]
Definition: legend1.C:17
Class from which all the other classes, representing functions, inherit.
virtual double operator()(const std::vector< double > &x) const =0
Evaluates the function using the vector containing the input values.