multi_min_fix Class Template Reference

Multidimensional minimizer fixing some variables and varying others. More...

#include <multi_min_fix.h>

Inheritance diagram for multi_min_fix:

multi_min

Detailed Description

template<class param_t, class bool_vec_t>
class multi_min_fix< param_t, bool_vec_t >

Multidimensional minimizer fixing some variables and varying others.

See an example for the usage of this class in Minimizer fixing variables example .

Todo:
Generalize to all vector types
Todo:
Generalize to minimizers which require derivatives

Definition at line 45 of file multi_min_fix.h.


Public Member Functions

 multi_min_fix ()
 Specify the member function pointer.
virtual int mmin (size_t nvar, ovector_base &x, double &fmin, param_t &pa, multi_funct< param_t > &func)
 Calculate the minimum min of func w.r.t. the array x of size nvar.
virtual int mmin_fix (size_t nvar, ovector_base &x, double &fmin, bool_vec_t &fix, param_t &pa, multi_funct< param_t > &func)
 Calculate the minimum of func while fixing some parameters as specified in fix.
int set_mmin (multi_min< param_t, multi_funct_mfptr< multi_min_fix, param_t > > &min)
 Change the base minimizer.

Data Fields

gsl_mmin_simp< param_t,
multi_funct_mfptr
< multi_min_fix, param_t > > 
def_mmin
 The default base minimizer.

Protected Member Functions

virtual int min_func (size_t nv, const ovector_base &x, double &y, param_t &pa)
 The new function to send to the minimizer.

Protected Attributes

multi_min< param_t,
multi_funct_mfptr
< multi_min_fix, param_t > > * 
mmp
 The minimizer.
multi_funct< param_t > * funcp
 The user-specified function.
size_t unv
 The user-specified number of variables.
size_t nv_new
 The new number of variables.
bool_vec_t * fixp
 Specify which parameters to fix.
ovector_basexp
 The user-specified initial vector.

Private Member Functions

 multi_min_fix (const multi_min_fix &)
multi_min_fixoperator= (const multi_min_fix &)

Member Function Documentation

virtual int mmin_fix ( size_t  nvar,
ovector_base x,
double &  fmin,
bool_vec_t &  fix,
param_t &  pa,
multi_funct< param_t > &  func 
) [inline, virtual]

Calculate the minimum of func while fixing some parameters as specified in fix.

If all of entries fix[0], fix[1], ... fix[nvar-1] are true, then this function assumes all of the parameters are fixed and that there is no minimization to be performed. In this case, it will return 0 for success without calling the error handler.

Definition at line 107 of file multi_min_fix.h.


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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page