RobWorkProject  23.9.11-
Static Public Member Functions | List of all members
TrapMethod Class Reference

Implementation of the trapezoidal rule for integration. More...

#include <TrapMethod.hpp>

Static Public Member Functions

template<class T >
static double trapezMethod (T &func, const int M, const double h)
 routine for calculating a definite integral using the trapezoidal rule More...
 

Detailed Description

Implementation of the trapezoidal rule for integration.

Member Function Documentation

◆ trapezMethod()

static double trapezMethod ( T &  func,
const int  M,
const double  h 
)
inlinestatic

routine for calculating a definite integral using the trapezoidal rule

Parameters
functhe integrand as a function object
Mthe limit in the integration
hthe stepsize
Returns
the evaluated integral

The documentation for this class was generated from the following file: