| # Gaudi Framework, version v21r7p1 |

Home |  | Generated: 15 Feb 2010

# FuncMinimum Class Reference

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

`#include <FuncMinimum.h>`

Inheritance diagram for FuncMinimum:

[legend]
Collaboration diagram for FuncMinimum:

[legend]

List of all members.

## 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

## Detailed Description

The simplest concrete implementation of IFuncMinimum interface.

See also:
  GaudiGSL/IFuncMinimum.h

Author:
  Kirill Miklyaev kirillm@iris1.itep.ru

Date:
  2002-09-14

Definition at line 29 of file FuncMinimum.h.

## Member Typedef Documentation

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

Definition at line 33 of file FuncMinimum.h.

## Constructor & Destructor Documentation

FuncMinimum::~FuncMinimum | ( |  | ) | `[virtual]`

Destructor.

Definition at line 355 of file FuncMinimum.cpp.

    00357 {}

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

Standard constructor.

See also:
  GaudiTool

Parameters:

  | 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

## Member Function Documentation

virtual StatusCode FuncMinimum::minimum | ( | const GenFunc & | func,
|  | Arg & | arg |
| ) |  |  | const`[virtual]`

Find minimum of the function "GenFunc".

See also:
  IFuncMinimum.h

Returns:
  StatusCode

virtual StatusCode FuncMinimum::minimum | ( | const GenFunc & | func,
|  | Arg & | arg,
|  | Covariance & | covar |
| ) |  |  | const`[virtual]`

Find minimum of the function "GenFunc".

See also:
  IFuncMinimum.h

Returns:
  StatusCode

StatusCode FuncMinimum::initialize | ( |  | ) | `[virtual]`

Overriding initialize.

The algorithm for multidimensional minimization

Reimplemented from GaudiTool.

Definition at line 289 of file FuncMinimum.cpp.

    00291 {
    00292   StatusCode sc = GaudiTool::initialize() ;
    00293
    00294   MsgStream log( msgSvc() , name() ) ;
    00295
    00296   if ( sc.isFailure() )
    00297     {
    00298       return Error ("Could not initiliaze base class GaudiTool", sc);
    00299     }
    00300
    00302   if(       "conjugate_fr" == m_algType )
    00303     {
    00304       m_type = gsl_multimin_fdfminimizer_conjugate_fr     ;
    00305       log << MSG::DEBUG
    00306           << "Minimization algorithm to be used: "
    00307           << "'gsl_multimin_fdfminimizer_conjugate_fr'"
    00308           << endmsg;
    00309     }
    00310   else if ( "conjugate_pr" == m_algType )
    00311     {
    00312       m_type = gsl_multimin_fdfminimizer_conjugate_pr     ;
    00313       log << MSG::DEBUG
    00314           << "Minimization algorithm to be used: "
    00315           << "'gsl_multimin_fdfminimizer_conjugate_pr'"
    00316           << endmsg;
    00317     }
    00318   else if ( "vector_bfgs" == m_algType )
    00319     {
    00320       m_type = gsl_multimin_fdfminimizer_vector_bfgs      ;
    00321       log << MSG::DEBUG
    00322           << "Minimization algorithm to be used: " <<
    00323           "'gsl_multimin_fdfminimizer_vector_bfgs'" << endmsg;
    00324     }
    00325   else if ( "steepest_descent" == m_algType )
    00326     {
    00327       m_type = gsl_multimin_fdfminimizer_steepest_descent ;
    00328       log << MSG::DEBUG
    00329           << "Minimization algorithm to be used: "
    00330           << "'gsl_multimin_fdfminimizer_steepest_descent'"
    00331           << endmsg;
    00332     }
    00333   else
    00334     {
    00335       return Error(" Unknown algorith type '"
    00336                    + std::string(m_algType) + "'");
    00337     }
    00338
    00339   return StatusCode::SUCCESS;
    00340 }

StatusCode FuncMinimum::finalize | ( | void |  | ) | `[virtual]`

standard finalization method

See also:
  AlgTool

  IAlgTool

Returns:
  status code

Reimplemented from GaudiTool.

Definition at line 342 of file FuncMinimum.cpp.

    00343 {
    00344   StatusCode sc = GaudiTool::finalize() ;
    00345
    00346   MsgStream log( msgSvc() , name() ) ;
    00347
    00348   if ( sc.isFailure() )
    00349     {
    00350       return Error("Could not finaliaze base class GaudiTool", sc);
    00351     }
    00352   return StatusCode::SUCCESS;
    00353 };

FuncMinimum& FuncMinimum::operator= | ( | const FuncMinimum & |  | ) | `[private]`

assignment operator is

## Friends And Related Function Documentation

friend class ToolFactory< FuncMinimum >`[friend]`

Definition at line 31 of file FuncMinimum.h.

## Member Data Documentation

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.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7p1/GaudiGSL/src/Components/FuncMinimum.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7p1/GaudiGSL/src/Components/FuncMinimum.cpp