|
signals-cpp
|
Specification for numerically integrating a black box function using the Trapezoidal method. More...
#include <Integration.h>
Static Public Member Functions | |
| template<typename T, typename BaseSignalSpec, typename TangentSignalSpec> | |
| static bool | integrate (Signal< T, BaseSignalSpec, TangentSignalSpec > &xInt, const Signal< T, TangentSignalSpec, TangentSignalSpec > &x, const double &t0, const double &tf, const bool &insertIntoHistory) |
| Trapezoidal integration implementation. | |
Specification for numerically integrating a black box function using the Trapezoidal method.
|
inlinestatic |
Trapezoidal integration implementation.
| xInt | The output signal representing the integration. |
| x | The input signal to be integrated. |
| t0 | The start time for the integration. |
| tf | The time to integrate to. Ideally the delta from the start time is small. |
| insertIntoHistory | Whether to store the result in xInt's memory. |
Trapezoidal integration increments the current integral by
\(\frac{x(t_0)+x(t_f)}{2}\Delta t\)