FuncMinimum Class Reference

The simplest concrete implementation of IFuncMinimum interface. More...

#include <src/Components/FuncMinimum.h>

Inheritance diagram for FuncMinimum:
Collaboration diagram for FuncMinimum:

Classes

class  FuncMinimumMisc
 

Public Types

typedef std::vector< const GenFunc * > Gradient
 
- Public Types inherited from extends< BASE, Interfaces >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces...>
 Typedef to the base of this class. More...
 
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces...>
 Typedef to the base of this class. More...
 
- Public Types inherited from extend_interfaces< Interfaces...>
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

StatusCode minimum (const GenFunc &func, Arg &arg) const override
 Find minimum of the function "GenFunc". More...
 
StatusCode minimum (const GenFunc &func, Arg &arg, Covariance &covar) const override
 Find minimum of the function "GenFunc". More...
 
StatusCode initialize () override
 Overriding initialize. More...
 
StatusCode finalize () override
 
 ~FuncMinimum () override=default
 Destructor. More...
 
 FuncMinimum (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
- Public Member Functions inherited from extends< BASE, Interfaces >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 ~extends () override=default
 Virtual destructor. More...
 
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 ~extends () override=default
 Virtual destructor. More...
 
- Public Member Functions inherited from extend_interfaces< Interfaces...>
 ~extend_interfaces () override=default
 Virtual destructor. More...
 
 ~extend_interfaces () override=default
 Virtual destructor. More...
 

Private Member Functions

 FuncMinimum ()=delete
 default constructor is private More...
 
 FuncMinimum (const FuncMinimum &)=delete
 copy constructor is private More...
 
FuncMinimumoperator= (const FuncMinimum &)=delete
 assignment operator is More...
 

Private Attributes

std::string m_algType = "conjugate_fr"
 
double m_max_iter = 200
 
double m_norm_gradient = 1.0e-10
 
double m_step_size = 0.01
 
double m_tol = 1e-10
 
const gsl_multimin_fdfminimizer_type * m_type = nullptr
 

Detailed Description

The simplest concrete implementation of IFuncMinimum interface.

See also
GaudiGSL/IFuncMinimum.h
Author
Kirill Miklyaev kiril.nosp@m.lm@i.nosp@m.ris1..nosp@m.itep.nosp@m..ru
Date
2002-09-14

Definition at line 24 of file FuncMinimum.h.

Member Typedef Documentation

typedef std::vector<const GenFunc*> FuncMinimum::Gradient

Definition at line 26 of file FuncMinimum.h.

Constructor & Destructor Documentation

FuncMinimum::~FuncMinimum ( )
overridedefault

Destructor.

FuncMinimum::FuncMinimum ( const std::string &  type,
const std::string &  name,
const IInterface parent 
)

Standard constructor.

See also
GaudiTool
Parameters
typetool type
nametool name
parentparent 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 52 of file FuncMinimum.cpp.

55  : base_class ( type, name , parent )
56 {
58  declareProperty ( "Algorithm", m_algType );
60  declareProperty ( "Iteration", m_max_iter );
62  declareProperty ( "Gradient" , m_norm_gradient );
64  declareProperty ( "Step_size", m_step_size );
66  declareProperty ( "Tol" , m_tol );
67 }
double m_norm_gradient
Definition: FuncMinimum.h:101
double m_tol
Definition: FuncMinimum.h:103
extends base_class
Typedef to this class.
Definition: extends.h:14
double m_step_size
Definition: FuncMinimum.h:102
std::string m_algType
Definition: FuncMinimum.h:99
double m_max_iter
Definition: FuncMinimum.h:100
string type
Definition: gaudirun.py:151
FuncMinimum::FuncMinimum ( )
privatedelete

default constructor is private

FuncMinimum::FuncMinimum ( const FuncMinimum )
privatedelete

copy constructor is private

Member Function Documentation

StatusCode FuncMinimum::finalize ( )
override

Definition at line 320 of file FuncMinimum.cpp.

321 {
323 
324  MsgStream log( msgSvc() , name() ) ;
325 
326  if ( sc.isFailure() )
327  {
328  return Error("Could not finalize base class GaudiTool", sc);
329  }
330  return StatusCode::SUCCESS;
331 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode finalize() override
standard finalization method
Definition: GaudiTool.cpp:179
StatusCode FuncMinimum::initialize ( )
override

Overriding initialize.

The algorithm for multidimensional minimization

Definition at line 268 of file FuncMinimum.cpp.

270 {
272 
273  MsgStream log( msgSvc() , name() ) ;
274 
275  if ( sc.isFailure() )
276  {
277  return Error ("Could not initialize base class GaudiTool", sc);
278  }
279 
281  if( "conjugate_fr" == m_algType )
282  {
283  m_type = gsl_multimin_fdfminimizer_conjugate_fr ;
284  log << MSG::DEBUG
285  << "Minimization algorithm to be used: "
286  << "'gsl_multimin_fdfminimizer_conjugate_fr'"
287  << endmsg;
288  }
289  else if ( "conjugate_pr" == m_algType )
290  {
291  m_type = gsl_multimin_fdfminimizer_conjugate_pr ;
292  log << MSG::DEBUG
293  << "Minimization algorithm to be used: "
294  << "'gsl_multimin_fdfminimizer_conjugate_pr'"
295  << endmsg;
296  }
297  else if ( "vector_bfgs" == m_algType )
298  {
299  m_type = gsl_multimin_fdfminimizer_vector_bfgs ;
300  log << MSG::DEBUG
301  << "Minimization algorithm to be used: " <<
302  "'gsl_multimin_fdfminimizer_vector_bfgs'" << endmsg;
303  }
304  else if ( "steepest_descent" == m_algType )
305  {
306  m_type = gsl_multimin_fdfminimizer_steepest_descent ;
307  log << MSG::DEBUG
308  << "Minimization algorithm to be used: "
309  << "'gsl_multimin_fdfminimizer_steepest_descent'"
310  << endmsg;
311  }
312  else
313  {
314  return Error(" Unknown algorithm type '" + m_algType + "'");
315  }
316 
317  return StatusCode::SUCCESS;
318 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
const gsl_multimin_fdfminimizer_type * m_type
Definition: FuncMinimum.h:104
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
std::string m_algType
Definition: FuncMinimum.h:99
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode initialize() override
standard initialization method
Definition: GaudiTool.cpp:161
StatusCode FuncMinimum::minimum ( const GenFunc &  func,
Arg &  arg 
) const
override

Find minimum of the function "GenFunc".

See also
IFuncMinimum.h
Returns
StatusCode
StatusCode FuncMinimum::minimum ( const GenFunc &  func,
Arg &  arg,
Covariance &  covar 
) const
override

Find minimum of the function "GenFunc".

See also
IFuncMinimum.h
Returns
StatusCode
FuncMinimum& FuncMinimum::operator= ( const FuncMinimum )
privatedelete

assignment operator is

Member Data Documentation

std::string FuncMinimum::m_algType = "conjugate_fr"
private

Definition at line 99 of file FuncMinimum.h.

double FuncMinimum::m_max_iter = 200
private

Definition at line 100 of file FuncMinimum.h.

double FuncMinimum::m_norm_gradient = 1.0e-10
private

Definition at line 101 of file FuncMinimum.h.

double FuncMinimum::m_step_size = 0.01
private

Definition at line 102 of file FuncMinimum.h.

double FuncMinimum::m_tol = 1e-10
private

Definition at line 103 of file FuncMinimum.h.

const gsl_multimin_fdfminimizer_type* FuncMinimum::m_type = nullptr
private

Definition at line 104 of file FuncMinimum.h.


The documentation for this class was generated from the following files: