| # Gaudi Framework, version v23r0 |

Home |  | Generated: Mon Jan 30 2012

# 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 extends1<GaudiTool, IFuncMinimum> {
    00030   // friend factory for instantiation
    00031   friend class ToolFactory<FuncMinimum> ;
    00032 public:
    00033   typedef std::vector<const GenFunc*> Gradient;
    00034 public:
    00035
    00040   virtual StatusCode minimum( const GenFunc& func  ,
    00041                               Arg&           arg   ) const;
    00042
    00047   virtual StatusCode minimum( const GenFunc& func  ,
    00048                               Arg&           arg   ,
    00049                               Covariance&    covar ) const;
    00050
    00052   virtual StatusCode initialize ();
    00053   virtual StatusCode finalize   ();
    00054
    00055   virtual ~FuncMinimum( );
    00056
    00057   class FuncMinimumMisc
    00058   {
    00059   public:
    00063     FuncMinimumMisc (const GenFunc& func ,
    00064                      Arg&           arg  );
    00065     // destructor
    00066     ~FuncMinimumMisc () ;
    00067
    00068   public:
    00069     inline const Arg&       argument () const { return m_argum ;}
    00070     inline       Arg&       argument ()       { return m_argum ;}
    00071     inline const GenFunc*   equation () const { return m_eq    ;}
    00072     inline const Gradient&  gradient () const { return m_grad  ;}
    00073   private:
    00074     // default constructor is disabled
    00075     FuncMinimumMisc () ;
    00076     // copy constructor is disabled
    00077     FuncMinimumMisc           ( const FuncMinimumMisc& );
    00078     // assignment operator is disabled
    00079     FuncMinimumMisc& operator=( const FuncMinimumMisc& );
    00080   private:
    00081     Arg              m_argum ;
    00082     const GenFunc*   m_eq    ;
    00083     Gradient         m_grad  ;
    00084   };
    00085
    00086
    00093   FuncMinimum( const std::string& type,
    00094                const std::string& name,
    00095                const IInterface* parent);
    00096
    00097 private:
    00098
    00100   FuncMinimum();
    00102   FuncMinimum           ( const FuncMinimum& );
    00104   FuncMinimum& operator=( const FuncMinimum& );
    00105
    00106 private:
    00107
    00108   std::string m_algType         ;
    00109   double      m_max_iter        ;
    00110   double      m_norm_gradient   ;
    00111   double      m_step_size       ;
    00112   double      m_tol             ;
    00113   const gsl_multimin_fdfminimizer_type* m_type ;
    00114 };
    00115
    00116 // ============================================================================
    00117 // The END
    00118 // ============================================================================
    00119 #endif // ALGTOOLS_FUNCMINIMUM_H
    00120 // ============================================================================

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines