Apollo
6.0
Open source self driving car software
|
Functions to compute integral. More...
#include <array>
#include <functional>
#include <utility>
#include <vector>
Go to the source code of this file.
Namespaces | |
apollo::common::math | |
apollo::common::math | |
apollo | |
PlanningContext is the runtime context in planning. It is persistent across multiple frames. | |
apollo::common | |
apollo::common | |
Functions | |
double | apollo::common::math::IntegrateBySimpson (const std::vector< double > &funv_vec, const double dx, const std::size_t nsteps) |
double | apollo::common::math::IntegrateByTrapezoidal (const std::vector< double > &funv_vec, const double dx, const std::size_t nsteps) |
template<std::size_t N> | |
std::pair< std::array< double, N >, std::array< double, N > > | apollo::common::math::GetGaussLegendrePoints () |
Get the points and weights for different ordered Gauss-Legendre integration. Currently support order 2 - 10. Other input order will trigger compiling error. More... | |
template<> | |
std::pair< std::array< double, 2 >, std::array< double, 2 > > | apollo::common::math::GetGaussLegendrePoints< 2 > () |
template<> | |
std::pair< std::array< double, 3 >, std::array< double, 3 > > | apollo::common::math::GetGaussLegendrePoints< 3 > () |
template<> | |
std::pair< std::array< double, 4 >, std::array< double, 4 > > | apollo::common::math::GetGaussLegendrePoints< 4 > () |
template<> | |
std::pair< std::array< double, 5 >, std::array< double, 5 > > | apollo::common::math::GetGaussLegendrePoints< 5 > () |
template<> | |
std::pair< std::array< double, 6 >, std::array< double, 6 > > | apollo::common::math::GetGaussLegendrePoints< 6 > () |
template<> | |
std::pair< std::array< double, 7 >, std::array< double, 7 > > | apollo::common::math::GetGaussLegendrePoints< 7 > () |
template<> | |
std::pair< std::array< double, 8 >, std::array< double, 8 > > | apollo::common::math::GetGaussLegendrePoints< 8 > () |
template<> | |
std::pair< std::array< double, 9 >, std::array< double, 9 > > | apollo::common::math::GetGaussLegendrePoints< 9 > () |
template<> | |
std::pair< std::array< double, 10 >, std::array< double, 10 > > | apollo::common::math::GetGaussLegendrePoints< 10 > () |
template<std::size_t N> | |
double | apollo::common::math::IntegrateByGaussLegendre (const std::function< double(double)> &func, const double lower_bound, const double upper_bound) |
Compute the integral of a target single-variable function from a lower bound to an upper bound, by 5-th Gauss-Legendre method Given a target function and integral lower and upper bound, compute the integral approximation using 5th order Gauss-Legendre integration. The target function must be a smooth function. Example: target function: auto func = [](const double x) {return x * x;}; double integral = gauss_legendre(func, -2, 3); This gives you the approximated integral of function x^2 in bound [-2, 3]. More... | |
Functions to compute integral.