RAIDA  1.9.0
IFitter.h
1 // -*- C++ -*-
2 // AID-GENERATED
3 // =========================================================================
4 // This class was generated by AID - Abstract Interface Definition
5 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
6 // =========================================================================
7 #ifndef AIDA_IFITTER_H
8 #define AIDA_IFITTER_H 1
9 
10 // This file is part of the AIDA library
11 // Copyright (C) 2002 by the AIDA team. All rights reserved.
12 // This library is free software and under the terms of the
13 // GNU Library General Public License described in the LGPL.txt
14 
15 #include <string>
16 #include <vector>
17 
18 namespace AIDA {
19 
20 class IBaseHistogram;
21 class IDataPointSet;
22 class IFitData;
23 class IFitParameterSettings;
24 class IFitResult;
25 class IFunction;
26 
39 class IFitter {
40 
41 public:
43  virtual ~IFitter() { /* nop */; }
44 
53  virtual IFitResult * fit(IFitData & fitData, IFunction & func) = 0;
54 
64  virtual IFitResult * fit(IBaseHistogram & hist, IFunction & func) = 0;
65 
75  virtual IFitResult * fit(IBaseHistogram & hist, const std::string & model) = 0;
76 
88  virtual IFitResult * fit(IBaseHistogram & hist, const std::string & model, const std::vector<double> & initialParameters) = 0;
89 
100  virtual IFitResult * fit(IDataPointSet & dataPointSet, IFunction & f) = 0;
101 
112  virtual IFitResult * fit(IDataPointSet & dataPointSet, const std::string & model) = 0;
113 
126  virtual IFitResult * fit(IDataPointSet & dataPointSet, const std::string & model, const std::vector<double> & initialParameters) = 0;
127 
129  virtual IFitResult * fit(IFitData & d, const std::string & model) = 0;
130 
131  virtual IFitResult * fit(IFitData & d, const std::string & model, const std::vector<double> & initialParameters) = 0;
132 
141  virtual bool setEngine(const std::string & name) = 0;
142 
148  virtual std::string engineName() = 0;
149 
161  virtual IFitParameterSettings & fitParameterSettings(const std::string & name) = 0;
162 
166  virtual std::vector<std::string> listParameterSettings() = 0;
167 
171  virtual void resetParameterSettings() = 0;
172 
177  virtual bool setConstraint(const std::string & expr) = 0;
178 
180  virtual std::vector<std::string> constraints() = 0;
181 
185  virtual void resetConstraints() = 0;
186 
194  virtual bool setFitMethod(const std::string & name) = 0;
195 
201  virtual std::string fitMethodName() = 0;
202 
209  virtual IDataPointSet * createScan1D(IFitData & d, IFunction & f, const std::string & par, int npts, double pmin, double pmax) = 0;
210 
215  virtual IDataPointSet * createContour(IFitData & d, IFitResult & r, const std::string & par1, const std::string & par2, int npts, double up) = 0;
216 
224  virtual void setUseFunctionGradient(bool useGrad) = 0;
225 
232  virtual bool useFunctionGradient() = 0;
233 
239  /*# IFitResult lnkIFitResult; */
240 
242  /*# IFitData lnkIFitData; */
243 
246  /*# IFitParameterSettings lnkIFitParameter; */
247 
250  /*# IFunction lnkIFunction; */
251 }; // class
252 } // namespace AIDA
253 #endif /* ifndef AIDA_IFITTER_H */
virtual IDataPointSet * createContour(IFitData &d, IFitResult &r, const std::string &par1, const std::string &par2, int npts, double up)=0
Create a 2D contour spanned on &#39;par1&#39; and &#39;par2&#39;, with given number of npts points.
virtual std::vector< std::string > constraints()=0
Get the list of all constraints.
Principal user-level function interface.
Definition: IFunction.h:35
virtual void resetConstraints()=0
Reset all the constraints.
virtual std::string engineName()=0
Get the name of the engine currently in use.
virtual bool useFunctionGradient()=0
Check if the IFitter is set to use the analytical derivatives provided by the IFunction.
virtual bool setFitMethod(const std::string &name)=0
Set the fit method type.
Basic user-level interface class for holding and managing a single set of &quot;data points&quot;.
Definition: IDataPointSet.h:31
virtual void setUseFunctionGradient(bool useGrad)=0
Choose between using or not using the analytical derivatives if provided by the function.
Definition: IFitParameterSettings.h:27
Definition: IFitResult.h:35
class IAnnotation;
Definition: IBaseHistogram.h:29
virtual std::string fitMethodName()=0
Get the name of the fit method currently in use.
virtual bool setConstraint(const std::string &expr)=0
Set a general constraint in the parameter space.
virtual ~IFitter()
Destructor.
Definition: IFitter.h:43
Definition: IFitData.h:92
virtual void resetParameterSettings()=0
Reset all parameter settings which fitter remebers.
virtual std::vector< std::string > listParameterSettings()=0
Get a vector of names of all parameter settings defined in the fitter.
virtual bool setEngine(const std::string &name)=0
Set the optimization engine which is used internally for fitting.
virtual IFitResult * fit(IFitData &fitData, IFunction &func)=0
Fit an IFunction to an IFitData.
virtual IFitParameterSettings & fitParameterSettings(const std::string &name)=0
Access to fit parameter settings.
virtual IDataPointSet * createScan1D(IFitData &d, IFunction &f, const std::string &par, int npts, double pmin, double pmax)=0
Create a 1D scan of the fit quality for given parameter &#39;par&#39; of the function.
Fitter performs fits, scans and computes contours.
Definition: IFitter.h:39