Hello,
I used the Minuit2 package by derivating a class from FCNBase and by
overloading the operator () as it is suggested in the manual:
mnusersguide.pdf
I works, but to improve the control on the fit I wanted to use:
ModularFunctionMinimizer
So I tried to instantiate the class by:
ModularFunctionMinimizer minimizer (*fFCN, par, stra, 0, 0.1) ;
where:
RR_Chi2 *fFCN ;
and where RR_Chi2 is a class derivated from FCNBase (the one that I used
before) previously instanciated (fFCN = new RR_Chi2 (x, y))
I get the following compilation error:
Fitter.cpp: In member function 'std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > ROOT::Minuit2::Fit_RR::Fit()':
Fitter.cpp:418: error: no matching function for call to 'ROOT::Minuit2::ModularFunctionMinimizer::ModularFunctionMinimizer(ROOT::Minuit2::RR_Chi2&, ROOT::Minuit2::MnUserParameters&, ROOT::Minuit2::MnStrategy&, int,double)'
ROOT::Minuit2::ModularFunctionMinimizer::ModularFunctionMinimizer(const ROOT::Minuit2::ModularFunctionMinimizer&) Fitter.cpp:418: error: cannot declare variable 'minimizer' to be ofabstract type 'ROOT::Minuit2::ModularFunctionMinimizer'
So, it looks like that I cannot instanciate a class
ModularFunctionMinimizer that way.
Question 1) how can I do it by keeping my previous code
2) If I have to rewrite my previous code, can I get an example ?
Thank.
-- --- ========================================================================== Patrick DUPRÉ | | Department of Chemistry | | Phone: (44)-(0)-1904-434384 The University of York | | Fax: (44)-(0)-1904-432516 Heslington | | York YO10 5DD United Kingdom | | email: pd520_at_york.ac.uk ==========================================================================Received on Sun Sep 14 2008 - 20:16:31 CEST
This archive was generated by hypermail 2.2.0 : Mon Sep 15 2008 - 11:50:02 CEST