41 "num_collect::integration::de_semi_infinite_integrator");
51template <
typename Variable>
82template <
typename Signature>
92template <
typename Result, base::concepts::real_scalar Variable>
115 template <base::concepts::invocable_as<result_type(variable_type)> Function>
116 [[nodiscard]]
auto integrate(
const Function& function)
const
134 sum += function(var_plus) * diff_coeff_plus;
139 sum += function(var_minus) * diff_coeff_minus;
142 return sum * interval;
152 template <base::concepts::invocable_as<result_type(variable_type)> Function>
153 [[nodiscard]]
auto operator()(
const Function& function)
const
166 this->
logger(),
"Maximum point must be a positive value.");
179 "Number of points must be a positive integer.");
197 std::cosh(changed_var);
static constexpr index_type default_points
Default number of points.
index_type points_
Number of points.
std::decay_t< Variable > variable_type
Type of variables.
auto operator()(const Function &function) const -> result_type
Integrate a function.
auto max_point(variable_type val) -> de_semi_infinite_integrator &
Set maximum point in changed variable.
de_semi_infinite_integrator()
Constructor.
auto integrate(const Function &function) const -> result_type
Integrate a function.
static auto diff_coeff(variable_type changed_var) -> variable_type
Calculate differential coefficient for change of variable.
auto points(index_type val) -> de_semi_infinite_integrator &
Set number of points.
variable_type max_point_
Maximum point in changed variable.
static constexpr auto default_max_point
Default maximum point in changed variable.
std::decay_t< Result > result_type
Type of results.
Class to perform numerical integration on semi-infinite range using double exponential rule.
Class of tags of logs without memory management.
Class to incorporate logging in algorithms.
logging_mixin(log_tag_view tag)
Constructor.
auto logger() const noexcept -> const num_collect::logging::logger &
Access to the logger.
Definition of index_type type.
Definition of invocable_as concept.
Definition of log_tag_view class.
Definition of logging_mixin class.
std::ptrdiff_t index_type
Type of indices in this library.
constexpr T pi
Value of pi, .
Namespace of internal implementations.
Namespace of numerical integration.
constexpr auto de_semi_infinite_integrator_tag
Tag of de_semi_infinite_integrator.
Definition of NUM_COLLECT_PRECONDITION macro.
#define NUM_COLLECT_PRECONDITION(CONDITION,...)
Check whether a precondition is satisfied and throw an exception if not.
Definition of real_scalar concept.
static constexpr double default_max_point
Default maximum point in changed variable.
static constexpr float default_max_point
Default maximum point in changed variable.
Helper class of constants for use in de_semi_infinite_integrator class.