|
Gaudi Framework, version v21r11 |
| Home | Generated: 30 Sep 2010 |
#include <FuncMinimum.h>
Public Types | |
| typedef std::vector< const GenFunc * > | Gradient |
Public Member Functions | |
| virtual StatusCode | minimum (const GenFunc &func, Arg &arg) const |
| Find minimum of the function "GenFunc". | |
| virtual StatusCode | minimum (const GenFunc &func, Arg &arg, Covariance &covar) const |
| Find minimum of the function "GenFunc". | |
| virtual StatusCode | initialize () |
| Overriding initialize. | |
| virtual StatusCode | finalize () |
| standard finalization method | |
| virtual | ~FuncMinimum () |
| Destructor. | |
| FuncMinimum (const std::string &type, const std::string &name, const IInterface *parent) | |
| Standard constructor. | |
Private Member Functions | |
| FuncMinimum () | |
| default constructor is private | |
| FuncMinimum (const FuncMinimum &) | |
| copy constructor is private | |
| FuncMinimum & | operator= (const FuncMinimum &) |
| assignment operator is | |
Private Attributes | |
| std::string | m_algType |
| double | m_max_iter |
| double | m_norm_gradient |
| double | m_step_size |
| double | m_tol |
| const gsl_multimin_fdfminimizer_type * | m_type |
| AlgTool type (concrete class name). | |
Friends | |
| class | ToolFactory< FuncMinimum > |
Classes | |
| class | FuncMinimumMisc |
Definition at line 29 of file FuncMinimum.h.
| typedef std::vector<const GenFunc*> FuncMinimum::Gradient |
Definition at line 33 of file FuncMinimum.h.
| FuncMinimum::~FuncMinimum | ( | ) | [virtual] |
| FuncMinimum::FuncMinimum | ( | const std::string & | type, | |
| const std::string & | name, | |||
| const IInterface * | parent | |||
| ) |
Standard constructor.
| type | tool type | |
| name | tool name | |
| parent | parent of the tool |
declare type of the algorithm for multidimensional minimization
declare maximum of iteration
declare the absolute tolerance for the Euclidean norm of the gradient
declare the size of the first trial step
declare the accuracy of the line minimization
Definition at line 61 of file FuncMinimum.cpp.
00064 : base_class ( type, name , parent ) 00065 , m_algType ( "conjugate_fr" ) 00066 , m_max_iter ( 200 ) 00067 , m_norm_gradient ( 1.0e-10 ) 00068 , m_step_size ( 0.01 ) 00069 , m_tol ( 1e-10 ) 00070 , m_type ( 0 ) 00071 { 00073 declareProperty ( "Algorithm", m_algType ); 00075 declareProperty ( "Iteration", m_max_iter ); 00077 declareProperty ( "Gradient" , m_norm_gradient ); 00079 declareProperty ( "Step_size", m_step_size ); 00081 declareProperty ( "Tol" , m_tol ); 00082 }
| FuncMinimum::FuncMinimum | ( | ) | [private] |
default constructor is private
| FuncMinimum::FuncMinimum | ( | const FuncMinimum & | ) | [private] |
copy constructor is private
| virtual StatusCode FuncMinimum::minimum | ( | const GenFunc & | func, | |
| Arg & | arg | |||
| ) | const [virtual] |
| virtual StatusCode FuncMinimum::minimum | ( | const GenFunc & | func, | |
| Arg & | arg, | |||
| Covariance & | covar | |||
| ) | const [virtual] |
| StatusCode FuncMinimum::initialize | ( | ) | [virtual] |
Overriding initialize.
The algorithm for multidimensional minimization
Reimplemented from GaudiTool.
Definition at line 288 of file FuncMinimum.cpp.
00290 { 00291 StatusCode sc = GaudiTool::initialize() ; 00292 00293 MsgStream log( msgSvc() , name() ) ; 00294 00295 if ( sc.isFailure() ) 00296 { 00297 return Error ("Could not initiliaze base class GaudiTool", sc); 00298 } 00299 00301 if( "conjugate_fr" == m_algType ) 00302 { 00303 m_type = gsl_multimin_fdfminimizer_conjugate_fr ; 00304 log << MSG::DEBUG 00305 << "Minimization algorithm to be used: " 00306 << "'gsl_multimin_fdfminimizer_conjugate_fr'" 00307 << endmsg; 00308 } 00309 else if ( "conjugate_pr" == m_algType ) 00310 { 00311 m_type = gsl_multimin_fdfminimizer_conjugate_pr ; 00312 log << MSG::DEBUG 00313 << "Minimization algorithm to be used: " 00314 << "'gsl_multimin_fdfminimizer_conjugate_pr'" 00315 << endmsg; 00316 } 00317 else if ( "vector_bfgs" == m_algType ) 00318 { 00319 m_type = gsl_multimin_fdfminimizer_vector_bfgs ; 00320 log << MSG::DEBUG 00321 << "Minimization algorithm to be used: " << 00322 "'gsl_multimin_fdfminimizer_vector_bfgs'" << endmsg; 00323 } 00324 else if ( "steepest_descent" == m_algType ) 00325 { 00326 m_type = gsl_multimin_fdfminimizer_steepest_descent ; 00327 log << MSG::DEBUG 00328 << "Minimization algorithm to be used: " 00329 << "'gsl_multimin_fdfminimizer_steepest_descent'" 00330 << endmsg; 00331 } 00332 else 00333 { 00334 return Error(" Unknown algorith type '" 00335 + std::string(m_algType) + "'"); 00336 } 00337 00338 return StatusCode::SUCCESS; 00339 }
| StatusCode FuncMinimum::finalize | ( | ) | [virtual] |
standard finalization method
Reimplemented from GaudiTool.
Definition at line 341 of file FuncMinimum.cpp.
00342 { 00343 StatusCode sc = GaudiTool::finalize() ; 00344 00345 MsgStream log( msgSvc() , name() ) ; 00346 00347 if ( sc.isFailure() ) 00348 { 00349 return Error("Could not finaliaze base class GaudiTool", sc); 00350 } 00351 return StatusCode::SUCCESS; 00352 }
| FuncMinimum& FuncMinimum::operator= | ( | const FuncMinimum & | ) | [private] |
assignment operator is
friend class ToolFactory< FuncMinimum > [friend] |
Definition at line 31 of file FuncMinimum.h.
std::string FuncMinimum::m_algType [private] |
Definition at line 108 of file FuncMinimum.h.
double FuncMinimum::m_max_iter [private] |
Definition at line 109 of file FuncMinimum.h.
double FuncMinimum::m_norm_gradient [private] |
Definition at line 110 of file FuncMinimum.h.
double FuncMinimum::m_step_size [private] |
Definition at line 111 of file FuncMinimum.h.
double FuncMinimum::m_tol [private] |
Definition at line 112 of file FuncMinimum.h.
const gsl_multimin_fdfminimizer_type* FuncMinimum::m_type [private] |
AlgTool type (concrete class name).
Reimplemented from AlgTool.
Definition at line 113 of file FuncMinimum.h.