limes 3.1.0
Composable Calculus Expressions for C++20
Loading...
Searching...
No Matches
limes::methods::trapezoidal< N, T > Struct Template Reference

Trapezoidal rule with N subdivisions. Achieves O(h^2) convergence. More...

#include <methods.hpp>

Public Types

using value_type = T
 

Public Member Functions

constexpr trapezoidal () noexcept=default
 
algorithms::integration_result< T > operator() (std::function< T(T)> const &f, T a, T b) const
 

Static Public Attributes

static constexpr std::size_t subdivisions = N
 

Detailed Description

template<std::size_t N, typename T = double>
struct limes::methods::trapezoidal< N, T >

Trapezoidal rule with N subdivisions. Achieves O(h^2) convergence.

Definition at line 214 of file methods.hpp.

Member Typedef Documentation

◆ value_type

template<std::size_t N, typename T = double>
using limes::methods::trapezoidal< N, T >::value_type = T

Definition at line 216 of file methods.hpp.

Constructor & Destructor Documentation

◆ trapezoidal()

template<std::size_t N, typename T = double>
constexpr limes::methods::trapezoidal< N, T >::trapezoidal ( )
constexprdefaultnoexcept

Member Function Documentation

◆ operator()()

template<std::size_t N, typename T = double>
algorithms::integration_result< T > limes::methods::trapezoidal< N, T >::operator() ( std::function< T(T)> const &  f,
a,
b 
) const
inline

Definition at line 221 of file methods.hpp.

Member Data Documentation

◆ subdivisions

template<std::size_t N, typename T = double>
constexpr std::size_t limes::methods::trapezoidal< N, T >::subdivisions = N
staticconstexpr

Definition at line 215 of file methods.hpp.


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