Hi,
Im trying resolve a numerical integral by a gaussian integral method.
I got the following example:
[code]#include “TF1.h”
#include “Math/WrappedTF1.h”
#include “Math/GaussIntegrator.h”
int IntegralNumerica()
{
TF1 f("Sin Function", "sin(x)", 0, TMath::Pi());
ROOT::Math::WrappedTF1 wf1(f);
ROOT::Math::GaussIntegrator ig;
ig.SetFunction(wf1,false);
ig.SetRelTolerance(0.001);
cout << ig.Integral(0, TMath::PiOver2()) << endl;
return 0;
}[/code]
When compile, the error appears:
Error: Can’t call GaussIntegrator::SetFunction(wf1,false) in current scope /opt/local/root_v5-32-00/macros/IntegralNumerica.C:22:
Possible candidates are…
Error: class,struct,union or type GaussIntegrator not defined /opt/local/root_v5-32-00/macros/IntegralNumerica.C:22:
*** Interpreter error recovered ***
any ideas?
Renato.