This is an example on how to use the quadrature method.
#include "../../Test.h"
class IntegrationTestCase : public Test
{
bool TestQuadAdaptive() {
AssertLessThenEqual(fabs(res.first - 2.0), 9.32e-5);
return true;
}
public:
virtual void run() { TestQuadAdaptive(); }
};
int main() {
IntegrationTestCase().run();
return 0;
}
std::pair< double, std::vector< double > > quadrature(const std::function< double(double)> &fun, const double &lower, const double &upper, const double &tol, const double &hMin)
Definition: Integration.h:117