testNewMinimizer.cxx File Reference

#include "Math/Minimizer.h"
#include "Math/Factory.h"
#include "Math/Functor.h"
#include "TVirtualFitter.h"
#include "Math/IFunction.h"
#include "Math/Util.h"
#include <cmath>
#include <cassert>
#include <string>
#include <iostream>
#include "TStopwatch.h"
#include "TMatrixD.h"
#include "TVectorD.h"
#include "TRandom3.h"
#include "TMath.h"

Go to the source code of this file.

Classes

class  RosenBrockFunction
class  TrigoFletcherFunction
class  ChebyQuadFunction

Typedefs

typedef void(*) FCN (Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)

Functions

void RosenBrock (Int_t &, Double_t *, Double_t &f, Double_t *par, Int_t)
double WoodFunction (const double *par)
double PowellFunction (const double *par)
double SimpleQuadFunction (const double *par)
const doubleTrueMinimum (const ROOT::Math::IMultiGenFunction &func)
void printMinimum (const std::vector< double > &x)
int DoNewMinimization (const ROOT::Math::IMultiGenFunction &func, const double *x0, const double *s0, ROOT::Math::Minimizer *min, double &minval, double &edm, double *minx)
int DoOldMinimization (FCN func, TVirtualFitter *min, double &minval, double &edm)
int testNewMinimizer (const ROOT::Math::IMultiGenFunction &func, const double *x0, const double *s0, const std::string &minimizer, const std::string &algoType)
int testOldMinimizer (FCN func, const std::string &fitter, int n=25)
int testRosenBrock ()
int testChebyQuad ()
int testTrigoFletcher ()
int testWood ()
int testPowell ()
int testQuadFunc ()
int main ()

Variables

int gNCall = 0
int gNCall2 = 0
int gNmin = 1000
int gVerbose = 0
bool useGradient = false
bool minos = true
double gAbsTolerance = 0.005


Typedef Documentation

typedef void(*) FCN(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag)

Definition at line 37 of file testNewMinimizer.cxx.


Function Documentation

int DoNewMinimization ( const ROOT::Math::IMultiGenFunction func,
const double x0,
const double s0,
ROOT::Math::Minimizer min,
double minval,
double edm,
double minx 
)

Definition at line 444 of file testNewMinimizer.cxx.

References copy(), DEBUG, ROOT::Math::eu, ROOT::Math::fabs(), func(), gAbsTolerance, gNCall, gVerbose, i, min, minos, ok, ROOT::Math::Util::ToString(), TrueMinimum(), useGradient, and xmin.

int DoOldMinimization ( FCN  func,
TVirtualFitter min,
double minval,
double edm 
)

Definition at line 514 of file testNewMinimizer.cxx.

References TMath::Abs(), gAbsTolerance, gVerbose, min, minos, and ok.

int main ( void   ) 

Definition at line 860 of file testNewMinimizer.cxx.

References gNmin, gVerbose, testChebyQuad(), testPowell(), testQuadFunc(), testRosenBrock(), testTrigoFletcher(), and testWood().

double PowellFunction ( const double par  ) 

Definition at line 393 of file testNewMinimizer.cxx.

References gNCall, w, and y.

Referenced by testPowell().

void printMinimum ( const std::vector< double > &  x  ) 

Definition at line 430 of file testNewMinimizer.cxx.

References i, n, and pr().

void RosenBrock ( Int_t ,
Double_t ,
Double_t f,
Double_t par,
Int_t   
)

Definition at line 43 of file testNewMinimizer.cxx.

References gNCall, x, and y.

double SimpleQuadFunction ( const double par  ) 

Definition at line 410 of file testNewMinimizer.cxx.

References gNCall, and y.

Referenced by testQuadFunc().

int testChebyQuad (  ) 

Definition at line 680 of file testNewMinimizer.cxx.

References func(), gNmin, max, n, testNewMinimizer(), x0, and x1.

int testNewMinimizer ( const ROOT::Math::IMultiGenFunction func,
const double x0,
const double s0,
const std::string minimizer,
const std::string algoType 
)

Definition at line 558 of file testNewMinimizer.cxx.

References ROOT::Math::Factory::CreateMinimizer(), DoNewMinimization(), func(), gNCall, gNCall2, gNmin, i, min, pr(), printMinimum(), w, and xmin.

int testOldMinimizer ( FCN  func,
const std::string fitter,
int  n = 25 
)

Definition at line 610 of file testNewMinimizer.cxx.

References DoOldMinimization(), TVirtualFitter::Fitter(), gNCall, gNmin, i, min, n, pr(), TVirtualFitter::SetDefaultFitter(), and w.

int testPowell (  ) 

Definition at line 802 of file testNewMinimizer.cxx.

References gNmin, PowellFunction(), testNewMinimizer(), and x0.

Referenced by main().

int testQuadFunc (  ) 

Definition at line 831 of file testNewMinimizer.cxx.

References gNmin, SimpleQuadFunction(), testNewMinimizer(), and x0.

Referenced by main().

int testRosenBrock (  ) 

Definition at line 643 of file testNewMinimizer.cxx.

References gNmin, and testNewMinimizer().

int testTrigoFletcher (  ) 

Definition at line 739 of file testNewMinimizer.cxx.

References gNmin, TrigoFletcherFunction::StartPoints(), and testNewMinimizer().

int testWood (  ) 

Definition at line 772 of file testNewMinimizer.cxx.

References gNmin, testNewMinimizer(), WoodFunction(), and x0.

Referenced by main().

const double* TrueMinimum ( const ROOT::Math::IMultiGenFunction func  ) 

Definition at line 419 of file testNewMinimizer.cxx.

References func(), RosenBrockFunction::TrueMinimum(), and TrigoFletcherFunction::TrueMinimum().

double WoodFunction ( const double par  ) 

Definition at line 373 of file testNewMinimizer.cxx.

References gNCall, w, x1, and y.

Referenced by testWood().


Variable Documentation

double gAbsTolerance = 0.005

Definition at line 33 of file testNewMinimizer.cxx.

int gNCall = 0

Definition at line 25 of file testNewMinimizer.cxx.

int gNCall2 = 0

Definition at line 26 of file testNewMinimizer.cxx.

int gNmin = 1000

Definition at line 27 of file testNewMinimizer.cxx.

int gVerbose = 0

Definition at line 28 of file testNewMinimizer.cxx.

bool minos = true

Definition at line 31 of file testNewMinimizer.cxx.

bool useGradient = false

Definition at line 29 of file testNewMinimizer.cxx.

Referenced by DoNewMinimization().


Generated on Tue Jul 5 16:07:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1