#include "Math/IFunction.h"
#include "Math/Integrator.h"
#include "GSLIntegrator.h"
#include "gsl/gsl_integration.h"
namespace ROOT {
namespace Math {
Integrator::Integrator(Integration::Type type , Integration::GKRule rule, double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(type, rule, absTol, relTol, size);
}
Integrator::Integrator(const IGenFunction &f, Integration::Type type , Integration::GKRule rule, double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(type, rule, absTol, relTol, size);
fIntegrator->SetFunction(f);
}
Integrator::Integrator(GSLFuncPointer f, Integration::Type type , Integration::GKRule rule, double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(type, rule, absTol, relTol, size);
fIntegrator->SetFunction(f);
}
Integrator::Integrator(double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(absTol, relTol, size);
}
Integrator::Integrator(const IGenFunction &f, double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(absTol, relTol, size);
fIntegrator->SetFunction(f);
}
Integrator::Integrator(GSLFuncPointer f, double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(absTol, relTol, size);
fIntegrator->SetFunction(f);
}
Integrator::Integrator(Integration::Type type , double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(type, absTol, relTol, size);
}
Integrator::Integrator(const IGenFunction &f, Integration::Type type , double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(type, absTol, relTol, size);
fIntegrator->SetFunction(f);
}
Integrator::Integrator(GSLFuncPointer f, Integration::Type type , double absTol, double relTol, size_t size) {
fIntegrator = new GSLIntegrator(type, absTol, relTol, size);
fIntegrator->SetFunction(f);
}
Integrator::~Integrator()
{
if (fIntegrator) delete fIntegrator;
}
Integrator::Integrator(const Integrator &)
{
}
Integrator & Integrator::operator = (const Integrator &rhs)
{
if (this == &rhs) return *this;
return *this;
}
void Integrator::SetFunction(const IGenFunction &f) {
fIntegrator->SetFunction(f);
}
void Integrator::SetFunction( const GSLFuncPointer &f) {
fIntegrator->SetFunction(f);
}
double Integrator::Integral(double a, double b) {
return fIntegrator->Integral(a, b);
}
double Integrator::Integral( const std::vector<double> & pts) {
return fIntegrator->Integral(pts);
}
double Integrator::Integral( ) {
return fIntegrator->Integral();
}
double Integrator::IntegralUp( double a ) {
return fIntegrator->IntegralUp(a);
}
double Integrator::IntegralLow( double b ) {
return fIntegrator->IntegralLow(b);
}
double Integrator::Integral(const IGenFunction & f, double a, double b) {
return fIntegrator->Integral(f, a, b);
}
double Integrator::Integral(const IGenFunction & f ) {
return fIntegrator->Integral(f);
}
double Integrator::IntegralUp(const IGenFunction & f, double a) {
return fIntegrator->IntegralUp(f, a);
}
double Integrator::IntegralLow(const IGenFunction & f, double b) {
return fIntegrator->IntegralLow(f, b);
}
double Integrator::Integral(const IGenFunction & f, const std::vector<double> & pts) {
return fIntegrator->Integral(f, pts);
}
double Integrator::Integral( GSLFuncPointer f , void * p, double a, double b) {
return fIntegrator->Integral(f, p, a, b);
}
double Integrator::Integral( GSLFuncPointer f, void * p ) {
return fIntegrator->Integral(f, p);
}
double Integrator::IntegralUp( GSLFuncPointer f, void * p, double a ) {
return fIntegrator->IntegralUp(f, p, a);
}
double Integrator::IntegralLow( GSLFuncPointer f, void * p, double b ) {
return fIntegrator->IntegralLow(f, p, b);
}
double Integrator::Integral( GSLFuncPointer f, void * p, const std::vector<double> & pts ) {
return fIntegrator->Integral(f, p, pts);
}
double Integrator::Result() const { return fIntegrator->Result(); }
double Integrator::Error() const { return fIntegrator->Error(); }
int Integrator::Status() const { return fIntegrator->Status(); }
void Integrator::SetAbsTolerance(double absTol){
fIntegrator->SetAbsTolerance(absTol);
}
void Integrator::SetRelTolerance(double relTol){
fIntegrator->SetRelTolerance(relTol);
}
void Integrator::SetIntegrationRule(Integration::GKRule rule){
fIntegrator->SetIntegrationRule(rule);
}
}
}
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.