sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 10093 - svn://svn.freehep.org/svn / freehep / cvs / aidainclude / tags / AIDA-33-BRANCH-pre-merge-1 / AIDA / IModelFunction.h
Show File - IModelFunction.h  [show properties]
Search for Help
spinner
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IMODELFUNCTION_H
#define AIDA_IMODELFUNCTION_H 1
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 <vector>
16 
17  #include "AIDA/IFunction.h"
18 
19  namespace AIDA {
20 
21  class IRangeSet;
22 
23  /** @interface IModelFunction
24   *
25   * Interface of model function for fitting (for advanced users).
26   *
27   * OPEN QUESTIONS:
28   *
29   * How to treat normalization at user level? Two possibilities:
30   * - we have "Gauss" and "NormalizedGauss", the first one user cannot
31   * use for ML fit
32   * - we have only one "Gauss" function, but it's smart and when normalized,
33   * gets rid of one of its parameters
34   *
35   * Normalization range might be set directly on the function by the user?
36   * Now we set it in the data pipe, Victor thinks that it is not very clear
37   * and should be on the function ;)
38   *
39   * @author The AIDA team (http://aida.freehep.org/)
40   *
41   */
42 
43  class IModelFunction : virtual public IFunction {
44 
45  public:
46      /// Destructor.
47      virtual ~IModelFunction() { /* nop */; }
48 
49    /// Return false if function does not provide the normalization capability.
50      virtual bool providesNormalization() const = 0;
51 
52    /**
53     * Normalize by internally adjusting some of the parameters.
54     * When normalization is on then integral of the function in
55     * the normalization range equals to 1.
56     */
57      virtual void normalize(bool on) = 0;
58 
59    /**
60     * Return true if normalization is currently switched on.
61     */
62      virtual bool isNormalized() const = 0;
63 
64    /**
65     * Compute gradient with respect to parameters.
66     */
67      virtual const std::vector<double> & parameterGradient(const std::vector<double> & x) const = 0;
68 
69    /**
70     * Return true if provides parameter gradient.
71     */
72      virtual bool providesParameterGradient() const = 0;
73 
74    /**
75     * Set the normalization range from -inf to +inf in the i-th
76     * axis (dimension).
77     *
78     * Full range is the default if not set otherwise.
79     * It is still possible to evaluate function outside of the
80     * normalization range.
81     *
82     * PENDING: no methods to retrieve current range!
83     */
84      virtual IRangeSet & normalizationRange(int iAxis) = 0;
85 
86    /**
87     * Set full range in all axes.
88     */
89      virtual void includeNormalizationAll() = 0;
90 
91    /**
92     * Set empty range in all axes.
93     */
94      virtual void excludeNormalizationAll() = 0;
95  }; // class
96  } // namespace AIDA
97  #endif /* ifndef AIDA_IMODELFUNCTION_H */


feed icon

sventon 2.5.1