limes 3.1.0
Composable Calculus Expressions for C++20
Loading...
Searching...
No Matches
concepts.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <concepts>
4#include <functional>
5#include "../algorithms/core/result.hpp"
6
7namespace limes::methods {
8
10template<typename M, typename T>
11concept IntegrationMethod = requires(M const& m, std::function<T(T)> f, T a, T b) {
12 { m(f, a, b) } -> std::convertible_to<algorithms::integration_result<T>>;
13};
14
16template<typename M>
17struct is_integration_method : std::false_type {};
18
19template<typename M>
21
22} // namespace limes::methods
A 1D integration method: callable with (function, lower, upper) returning integration_result.
Definition concepts.hpp:11
constexpr bool is_integration_method_v
Definition concepts.hpp:20
Type trait to tag types as integration methods (specialized per method struct)
Definition concepts.hpp:17