![]() |
|
|
Generated: 24 Nov 2008 |
#include <FuncMinimum.h>


Definition at line 29 of file 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 &) |
| assignement 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 |
| typedef std::vector<const GenFunc*> FuncMinimum::Gradient |
Definition at line 37 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 my special interface
declare type of the algorithm for multidimensional minimization
declare maximum of iteration
declare the absolute tolerence 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 : GaudiTool ( 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 { 00072 00074 declareInterface <IFuncMinimum>(this); 00075 00077 declareProperty ( "Algorithm", m_algType ); 00079 declareProperty ( "Iteration", m_max_iter ); 00081 declareProperty ( "Gradient" , m_norm_gradient ); 00083 declareProperty ( "Step_size", m_step_size ); 00085 declareProperty ( "Tol" , m_tol ); 00086 }
| 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 293 of file FuncMinimum.cpp.
00295 { 00296 StatusCode sc = GaudiTool::initialize() ; 00297 00298 MsgStream log( msgSvc() , name() ) ; 00299 00300 if ( sc.isFailure() ) 00301 { 00302 return Error ("Could not initiliaze base class GaudiTool", sc); 00303 } 00304 00306 if( "conjugate_fr" == m_algType ) 00307 { 00308 m_type = gsl_multimin_fdfminimizer_conjugate_fr ; 00309 log << MSG::DEBUG 00310 << "Minimization algorithm to be used: " 00311 << "'gsl_multimin_fdfminimizer_conjugate_fr'" 00312 << endreq; 00313 } 00314 else if ( "conjugate_pr" == m_algType ) 00315 { 00316 m_type = gsl_multimin_fdfminimizer_conjugate_pr ; 00317 log << MSG::DEBUG 00318 << "Minimization algorithm to be used: " 00319 << "'gsl_multimin_fdfminimizer_conjugate_pr'" 00320 << endreq; 00321 } 00322 else if ( "vector_bfgs" == m_algType ) 00323 { 00324 m_type = gsl_multimin_fdfminimizer_vector_bfgs ; 00325 log << MSG::DEBUG 00326 << "Minimization algorithm to be used: " << 00327 "'gsl_multimin_fdfminimizer_vector_bfgs'" << endreq; 00328 } 00329 else if ( "steepest_descent" == m_algType ) 00330 { 00331 m_type = gsl_multimin_fdfminimizer_steepest_descent ; 00332 log << MSG::DEBUG 00333 << "Minimization algorithm to be used: " 00334 << "'gsl_multimin_fdfminimizer_steepest_descent'" 00335 << endreq; 00336 } 00337 else 00338 { 00339 return Error(" Unknown algorith type '" 00340 + std::string(m_algType) + "'"); 00341 } 00342 00343 return StatusCode::SUCCESS; 00344 }
| StatusCode FuncMinimum::finalize | ( | void | ) | [virtual] |
standard finalization method
Reimplemented from GaudiTool.
Definition at line 346 of file FuncMinimum.cpp.
00347 { 00348 StatusCode sc = GaudiTool::finalize() ; 00349 00350 MsgStream log( msgSvc() , name() ) ; 00351 00352 if ( sc.isFailure() ) 00353 { 00354 return Error("Could not finaliaze base class GaudiTool", sc); 00355 } 00356 return StatusCode::SUCCESS; 00357 };
| FuncMinimum& FuncMinimum::operator= | ( | const FuncMinimum & | ) | [private] |
assignement operator is
friend class ToolFactory< FuncMinimum > [friend] |
Definition at line 35 of file FuncMinimum.h.
std::string FuncMinimum::m_algType [private] |
Definition at line 112 of file FuncMinimum.h.
double FuncMinimum::m_max_iter [private] |
Definition at line 113 of file FuncMinimum.h.
double FuncMinimum::m_norm_gradient [private] |
Definition at line 114 of file FuncMinimum.h.
double FuncMinimum::m_step_size [private] |
Definition at line 115 of file FuncMinimum.h.
double FuncMinimum::m_tol [private] |
Definition at line 116 of file FuncMinimum.h.
const gsl_multimin_fdfminimizer_type* FuncMinimum::m_type [private] |
AlgTool type (concrete class name).
Reimplemented from AlgTool.
Definition at line 117 of file FuncMinimum.h.