28 template<
typename Quadrature>
30 double relative_precion,
int initial_order) :
31 m_relative_precion { relative_precion }, m_initial_order { initial_order } {
34 template<
typename Quadrature>
36 double min,
double max) {
37 int m = m_initial_order;
38 double value_order_m = 0.;
39 double value_order_m_1 = m_quadrature(
function, min, max, m);
43 value_order_m = value_order_m_1;
44 value_order_m_1 = m_quadrature(
function, min, max, value_order_m, m);
45 diff = value_order_m_1 - value_order_m;
46 }
while (std::abs(diff / value_order_m) > m_relative_precion);
48 return value_order_m_1;
Interface class representing a function.
double operator()(const Function &function, double min, double max) override
Functional call.
AdaptativeIntegration(double relative_precision, int initial_order)
Constructor.