| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- File List
- File Members

# FuncMinimum.h

Go to the documentation of this file.

    00001 // $Id: FuncMinimum.h,v 1.3 2006/11/30 10:40:53 mato Exp $
    00002 // ============================================================================
    00003 #ifndef ALGTOOLS_FUNCMINIMUM_H
    00004 #define ALGTOOLS_FUNCMINIMUM_H 1
    00005 // Include files
    00006 // from CLHEP
    00007 #include "CLHEP/GenericFunctions/GenericFunctions.hh"
    00008 #include "CLHEP/GenericFunctions/Argument.hh"
    00009 #include "CLHEP/GenericFunctions/AbsFunction.hh"
    00010 #include "CLHEP/Matrix/SymMatrix.h"
    00011 // from Gaudi
    00012 #include "GaudiAlg/GaudiTool.h"
    00013 //from GSL
    00014 #include "gsl/gsl_multimin.h"
    00015
    00016 // local
    00017 #include "GaudiGSL/IFuncMinimum.h"
    00018
    00020 template <class TOOL> class ToolFactory;
    00021
    00029 class FuncMinimum : public GaudiTool,
    00030                     virtual public IFuncMinimum
    00031
    00032
    00033 {
    00034   // friend factory for instantiation
    00035   friend class ToolFactory<FuncMinimum> ;
    00036 public:
    00037   typedef std::vector<const GenFunc*> Gradient;
    00038 public:
    00039
    00044   virtual StatusCode minimum( const GenFunc& func  ,
    00045                               Arg&           arg   ) const;
    00046
    00051   virtual StatusCode minimum( const GenFunc& func  ,
    00052                               Arg&           arg   ,
    00053                               Covariance&    covar ) const;
    00054
    00056   virtual StatusCode initialize ();
    00057   virtual StatusCode finalize   ();
    00058
    00059   virtual ~FuncMinimum( );
    00060
    00061   class FuncMinimumMisc
    00062   {
    00063   public:
    00067     FuncMinimumMisc (const GenFunc& func ,
    00068                      Arg&           arg  );
    00069     // destructor
    00070     ~FuncMinimumMisc () ;
    00071
    00072   public:
    00073     inline const Arg&       argument () const { return m_argum ;}
    00074     inline       Arg&       argument ()       { return m_argum ;}
    00075     inline const GenFunc*   equation () const { return m_eq    ;}
    00076     inline const Gradient&  gradient () const { return m_grad  ;}
    00077   private:
    00078     // default constructor is disabled
    00079     FuncMinimumMisc () ;
    00080     // copy constructor is disabled
    00081     FuncMinimumMisc           ( const FuncMinimumMisc& );
    00082     // assignement operator is disabled
    00083     FuncMinimumMisc& operator=( const FuncMinimumMisc& );
    00084   private:
    00085     Arg              m_argum ;
    00086     const GenFunc*   m_eq    ;
    00087     Gradient         m_grad  ;
    00088   };
    00089
    00090
    00097   FuncMinimum( const std::string& type,
    00098                const std::string& name,
    00099                const IInterface* parent);
    00100
    00101 private:
    00102
    00104   FuncMinimum();
    00106   FuncMinimum           ( const FuncMinimum& );
    00108   FuncMinimum& operator=( const FuncMinimum& );
    00109
    00110 private:
    00111
    00112   std::string m_algType         ;
    00113   double      m_max_iter        ;
    00114   double      m_norm_gradient   ;
    00115   double      m_step_size       ;
    00116   double      m_tol             ;
    00117   const gsl_multimin_fdfminimizer_type* m_type ;
    00118 };
    00119
    00120 // ============================================================================
    00121 // The END
    00122 // ============================================================================
    00123 #endif // ALGTOOLS_FUNCMINIMUM_H
    00124 // ============================================================================