![]() |
C++ Library Extensions 2022.12.09
To help learn modern C++ programming
|
#include <cpg/cpg_types.hpp>
Go to the source code of this file.
Classes | |
struct | cpg::numerical_analysis::delta< Type > |
Namespaces | |
namespace | cpg |
Includes subnamespace conversion. | |
namespace | cpg::numerical_analysis |
namespace | cpg::numerical_analysis::commands |
Functions | |
template<typename Type > | |
constexpr Type | cpg::numerical_analysis::positive_infinity (Type v) |
template<typename Type > | |
constexpr Type | cpg::numerical_analysis::negative_infinity (Type v) |
template<typename Type > | |
constexpr Type | cpg::numerical_analysis::positive_approach (Type value) |
template<typename Type > | |
constexpr Type | cpg::numerical_analysis::negative_approach (Type value) |
template<typename ValueType , std::size_t N, typename PairType = std::pair<ValueType, ValueType>, typename ReturnType = std::array<PairType, N>> | |
constexpr ReturnType | cpg::numerical_analysis::weights_abscissae () noexcept |
template<std::size_t WeightCount = 21, typename FunctionType = double(&)(double), typename ValueType = double> | |
ValueType | cpg::numerical_analysis::gaussian_quadrature (FunctionType &&f, ValueType x1, ValueType x2) |
template<std::size_t WeightCount = 12, typename FuncType = double(&)(double), cpt::arithmetic_c BoundType = double> | |
BoundType | cpg::numerical_analysis::adaptive_gaussian_quadrature (FuncType &&f, BoundType a, BoundType b) |
template<typename FuncType , cpt::tuple_flat_c TupleType> requires (cpt::arithmetic_c<FuncType> || requires{ std::apply(func, arg); }) | |
auto | cpg::numerical_analysis::smart_apply (FuncType &&func, TupleType arg) |
template<typename FuncType , cpt::arithmetic_c ArgType> requires (cpt::arithmetic_c<FuncType> || std::invocable<FuncType, ArgType>) | |
auto | cpg::numerical_analysis::evaluate (FuncType &&f, ArgType arg1) |
template<typename FuncType , cpt::arithmetic_c ArgType> requires (cpt::arithmetic_c<FuncType> || std::invocable<FuncType, ArgType, ArgType>) | |
auto | cpg::numerical_analysis::evaluate (FuncType &&f, ArgType arg1, ArgType arg2) |
template<typename FuncType , cpt::arithmetic_c ArgType> requires (cpt::arithmetic_c<FuncType> || std::invocable<FuncType, ArgType, ArgType, ArgType>) | |
auto | cpg::numerical_analysis::evaluate (FuncType &&f, ArgType arg1, ArgType arg2, ArgType arg3) |
template<typename FuncType , cpt::arithmetic_c ArgType> requires (cpt::arithmetic_c<FuncType> || std::invocable<FuncType, ArgType, ArgType, ArgType, ArgType>) | |
auto | cpg::numerical_analysis::evaluate (FuncType &&f, ArgType arg1, ArgType arg2, ArgType arg3, ArgType arg4) |
template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType> | |
auto | cpg::numerical_analysis::evaluate (std::tuple< FuncType1, FuncType2 > funcs, ArgType arg1) |
template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType> | |
auto | cpg::numerical_analysis::evaluate (std::tuple< FuncType1, FuncType2 > funcs, ArgType arg1, ArgType arg2) |
template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType> | |
auto | cpg::numerical_analysis::evaluate (std::tuple< FuncType1, FuncType2 > funcs, ArgType arg1, ArgType arg2, ArgType arg3) |
template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType> | |
auto | cpg::numerical_analysis::evaluate (std::tuple< FuncType1, FuncType2 > funcs, ArgType arg1, ArgType arg2, ArgType arg3, ArgType arg4) |
template<bool UseRecursion = true, std::size_t WeightCount = 31, typename FuncType = double(&)(double), typename BoundType = double> requires (cpt::arithmetic_c<FuncType> || std::invocable<FuncType, BoundType>) | |
BoundType | cpg::numerical_analysis::integral (FuncType &&f, std::tuple< BoundType, BoundType > bound) |
template<bool UseRecursion = true, std::size_t WeightCount = 31, typename FuncType = double, typename Lower_0 = double, typename Upper_0 = double, typename Lower_1 = double, typename Upper_1 = double, auto First = 0, auto Second = 1> | |
std::common_type_t< Lower_0, Upper_0 > | cpg::numerical_analysis::integral (FuncType &&f, std::tuple< Lower_0, Upper_0 > bound_0, std::tuple< Lower_1, Upper_1 > bound_1, cpt::sequence< First, Second >) |
template<bool UseRecursion = true, std::size_t WeightCount = 31, typename FuncType = double(&)(double), typename Lower_0 = double, typename Upper_0 = double, typename Lower_1 = double, typename Upper_1 = double, typename Lower_2 = double, typename Upper_2 = double, auto First = 0, auto Second = 1, auto Third = 2> | |
std::common_type_t< Lower_0, Upper_0 > | cpg::numerical_analysis::integral (FuncType &&f, std::tuple< Lower_0, Upper_0 > bound_0, std::tuple< Lower_1, Upper_1 > bound_1, std::tuple< Lower_2, Upper_2 > bound_2, cpt::sequence< First, Second, Third >) |
template<bool UseRecursion = true, std::size_t WeightCount = 31, typename FuncType = double(&)(double), typename Lower_0 = double, typename Upper_0 = double, typename Lower_1 = double, typename Upper_1 = double, typename Lower_2 = double, typename Upper_2 = double, typename Lower_3 = double, typename Upper_3 = double, auto First = 0, auto Second = 1, auto Third = 2, auto Fourth = 3> | |
std::common_type_t< Lower_0, Upper_0 > | cpg::numerical_analysis::integral (FuncType &&f, std::tuple< Lower_0, Upper_0 > bound_0, std::tuple< Lower_1, Upper_1 > bound_1, std::tuple< Lower_2, Upper_2 > bound_2, std::tuple< Lower_3, Upper_2 > bound_3, cpt::sequence< First, Second, Third, Fourth >) |
template<auto Order, typename DeltaType > | |
constexpr auto | cpg::numerical_analysis::get_delta (delta< DeltaType > del) noexcept |
template<typename CountType , typename BoundType > | |
BoundType | cpg::numerical_analysis::compute_delta (CountType count, std::array< BoundType, 2 > &bound) noexcept |
template<typename Type > | |
Type | cpg::numerical_analysis::adjust_integer (auto arg) noexcept |
template<typename Type > | |
Type | cpg::numerical_analysis::adjust_zero (auto arg) noexcept |
template<typename SeqType , typename... SeqTypes> | |
constexpr auto | cpg::numerical_analysis::create_command (SeqType, SeqTypes...) noexcept |
template<std::size_t Order, typename FuncType , typename ArgType > | |
auto | cpg::numerical_analysis::nine_point_stencil (FuncType &&f, ArgType x) noexcept |
template<std::size_t Order, typename FuncType , typename ArgType > | |
auto | cpg::numerical_analysis::seven_point_stencil (FuncType &&f, ArgType x) noexcept |
template<std::size_t Order, typename FunctionType , typename ArgType > | |
ArgType | cpg::numerical_analysis::five_point_stencil (FunctionType &&f, ArgType x) noexcept |
template<auto VarIndex, typename FuncType , cpt::arithmetic_c... ArgTypes> | |
auto | cpg::numerical_analysis::fix_variables_other_than_VarIndex_ed (FuncType &&func, ArgTypes... args) noexcept |
template<auto VarIndex, typename FuncType , cpt::arithmetic_c... ArgTypes> | |
auto | cpg::numerical_analysis::fix_variables_other_than_VarIndex_ed (FuncType &&func, std::tuple< ArgTypes... > args) noexcept |
template<auto VarIndex, typename FuncType , cpt::arithmetic_c ArgType, std::size_t N> | |
auto | cpg::numerical_analysis::fix_variables_other_than_VarIndex_ed (FuncType &&func, std::array< ArgType, N > args) noexcept |
template<auto VarIndex, auto Order, typename FuncType , cpt::arithmetic_c... ArgTypes> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::sequence< VarIndex, Order >, FuncType &&func, ArgTypes... args) noexcept |
template<auto VarIndex, auto Order, typename FuncType , cpt::arithmetic_c... ArgTypes> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::sequence< VarIndex, Order >, FuncType &&func, std::tuple< ArgTypes... > args) noexcept |
template<auto VarIndex, auto Order, typename FuncType , cpt::arithmetic_c ArgType, std::size_t N> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::sequence< VarIndex, Order >, FuncType &&func, std::array< ArgType, N > args) noexcept |
template<typename VarOdr , typename FuncType , cpt::arithmetic_c... ArgTypes> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::type_container< VarOdr >, FuncType &&func, ArgTypes... args) noexcept |
template<typename VarOdr , typename FuncType , cpt::arithmetic_c... ArgTypes> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::type_container< VarOdr > cmd, FuncType &&func, std::tuple< ArgTypes... > const &args) noexcept |
template<typename VarOdr , typename FuncType , cpt::arithmetic_c ArgType, std::size_t N> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::type_container< VarOdr > cmd, FuncType &&func, std::array< ArgType, N > const &args) noexcept |
template<typename VarOdr1 , typename VarOdr2 , typename... VarOdrs, typename FuncType , cpt::arithmetic_c... ArgTypes> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::type_container< VarOdr1, VarOdr2, VarOdrs... >, FuncType &&func, ArgTypes... args) noexcept |
template<typename VarOdr1 , typename VarOdr2 , typename... VarOdrs, typename FuncType , cpt::arithmetic_c... ArgTypes> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::type_container< VarOdr1, VarOdr2, VarOdrs... > cmd, FuncType &&func, std::tuple< ArgTypes... > const &args) noexcept |
template<typename VarOdr1 , typename VarOdr2 , typename... VarOdrs, typename FuncType , cpt::arithmetic_c ArgType, std::size_t N> | |
auto | cpg::numerical_analysis::partial_derivative (cpt::type_container< VarOdr1, VarOdr2, VarOdrs... > cmd, FuncType &&func, std::array< ArgType, N > const &args) noexcept |
template<typename FuncType , typename... VariableTypes, typename ParamType > | |
auto | cpg::numerical_analysis::directional_derivative (FuncType &&f, std::tuple< VariableTypes... > const &vars, ParamType param) |
template<typename... CmdTypes, typename FuncType , typename... VariableTypes, typename... ParamTypes> | |
auto | cpg::numerical_analysis::parametric_derivative (cpt::type_container< CmdTypes... > cmd, FuncType &&f, std::tuple< VariableTypes... > const &vars, ParamTypes... ps) |
template<typename... CmdTypes, typename FuncType , typename... VariableTypes, typename... ParamTypes> | |
auto | cpg::numerical_analysis::parametric_derivative (cpt::type_container< CmdTypes... > cmd, FuncType &&f, std::tuple< VariableTypes... > const &vars, std::tuple< ParamTypes... > ps) |
template<typename... CmdTypes, typename FuncType , typename... VariableTypes, typename ParamType , std::size_t N> | |
auto | cpg::numerical_analysis::parametric_derivative (cpt::type_container< CmdTypes... > cmd, FuncType &&f, std::tuple< VariableTypes... > const &vars, std::array< ParamType, N > ps) |
template<typename FuncType , cpt::arithmetic_c... ArgTypes> requires ( std::is_invocable_v<FuncType, ArgTypes...> ) | |
auto | cpg::numerical_analysis::gradient (FuncType &&function, ArgTypes... args) noexcept |
template<typename FuncType , cpt::arithmetic_c... ArgTypes> requires ( std::is_invocable_v<FuncType, ArgTypes...> ) | |
auto | cpg::numerical_analysis::gradient (FuncType &&function, const std::tuple< ArgTypes... > &args) noexcept |
template<typename FuncType , cpt::arithmetic_c ArgType, std::size_t N> | |
auto | cpg::numerical_analysis::gradient (FuncType &&function, const std::array< ArgType, N > &args) noexcept |
template<typename FuncTypeX , typename FuncTypeY , typename FuncTypeZ , cpt::arithmetic_c... ArgTypes> requires ( std::is_invocable_v<FuncTypeX, ArgTypes...> && std::is_invocable_v<FuncTypeY, ArgTypes...> && std::is_invocable_v<FuncTypeZ, ArgTypes...> ) | |
auto | cpg::numerical_analysis::curl (FuncTypeX &&func_x, FuncTypeY &&func_y, FuncTypeZ &&func_z, ArgTypes... args) noexcept |
template<typename FuncTypeX , typename FuncTypeY , typename FuncTypeZ , cpt::arithmetic_c... ArgTypes> requires ( std::is_invocable_v<FuncTypeX, ArgTypes...> && std::is_invocable_v<FuncTypeY, ArgTypes...> && std::is_invocable_v<FuncTypeZ, ArgTypes...> ) | |
auto | cpg::numerical_analysis::curl (FuncTypeX &&func_x, FuncTypeY &&func_y, FuncTypeZ &&func_z, const std::tuple< ArgTypes... > &args) noexcept |
template<typename FuncTypeX , typename FuncTypeY , typename FuncTypeZ , cpt::arithmetic_c ArgType, std::size_t N> | |
auto | cpg::numerical_analysis::curl (FuncTypeX &&func_x, FuncTypeY &&func_y, FuncTypeZ &&func_z, const std::array< ArgType, N > &args) noexcept |
template<typename FuncTypeX , typename FuncTypeY , typename FuncTypeZ , cpt::arithmetic_c... ArgTypes> requires ( std::is_invocable_v<FuncTypeX, ArgTypes...> && std::is_invocable_v<FuncTypeY, ArgTypes...> && std::is_invocable_v<FuncTypeZ, ArgTypes...> ) | |
auto | cpg::numerical_analysis::divergence (FuncTypeX &&func_x, FuncTypeY &&func_y, FuncTypeZ &&func_z, ArgTypes... args) noexcept |
template<typename FuncTypeX , typename FuncTypeY , typename FuncTypeZ , cpt::arithmetic_c... ArgTypes> requires ( std::is_invocable_v<FuncTypeX, ArgTypes...> && std::is_invocable_v<FuncTypeY, ArgTypes...> && std::is_invocable_v<FuncTypeZ, ArgTypes...> ) | |
auto | cpg::numerical_analysis::divergence (FuncTypeX &&func_x, FuncTypeY &&func_y, FuncTypeZ &&func_z, const std::tuple< ArgTypes... > &args) noexcept |
template<typename FuncTypeX , typename FuncTypeY , typename FuncTypeZ , cpt::arithmetic_c ArgType, std::size_t N> | |
auto | cpg::numerical_analysis::divergence (FuncTypeX &&func_x, FuncTypeY &&func_y, FuncTypeZ &&func_z, const std::array< ArgType, N > &args) noexcept |
template<typename FuncType , typename BoundType > requires requires { func(BoundType{}); } | |
auto | cpg::numerical_analysis::evaluate (FuncType &&func, std::size_t N, std::array< BoundType, 2 > bound) |
template<std::size_t VarIndex, typename FuncType , typename BoundType , typename... ArgTypes> | |
auto | cpg::numerical_analysis::evaluate (FuncType &&func, std::size_t N, std::array< BoundType, 2 > bound, ArgTypes... args) |
template<auto VarIndex, auto DerivativeOrder, typename FuncType , typename BoundType > requires requires { func(BoundType{}); } | |
auto | cpg::numerical_analysis::differentiate (cpt::sequence< VarIndex, DerivativeOrder >, FuncType &&func, std::size_t N, std::array< BoundType, 2 > bound) |
template<auto VarIndex, typename IndexType , typename... IndexTypes, typename FuncType , typename BoundType > requires requires { func(args...); } | |
auto | cpg::numerical_analysis::differentiate (cpt::type_container< IndexType, IndexTypes... > command, FuncType &&func, std::size_t N, std::array< BoundType, 2 > bound, auto... args) |
template<std::size_t CountX, std::size_t CountY, std::size_t CountZ, typename FuncType , typename BoundType > requires requires { func( BoundType{}, BoundType{}, BoundType{}); } | |
auto | cpg::numerical_analysis::gradients (FuncType &&func, std::array< BoundType, 2 > bound_x, std::array< BoundType, 2 > bound_y, std::array< BoundType, 2 > bound_z) |
template<std::size_t CountX, std::size_t CountY, std::size_t CountZ, typename FuncTypeX , typename FuncTypeY , typename FuncTypeZ , typename BoundType > requires requires { func_x( BoundType{}, BoundType{}, BoundType{}); func_y( BoundType{}, BoundType{}, BoundType{}); func_z( BoundType{}, BoundType{}, BoundType{}); } | |
auto | cpg::numerical_analysis::curls (FuncTypeX &&func_x, FuncTypeY &&func_y, FuncTypeZ &&func_z, std::array< BoundType, 2 > bound_x, std::array< BoundType, 2 > bound_y, std::array< BoundType, 2 > bound_z) |
template<std::size_t CountX, std::size_t CountY, std::size_t CountZ, typename FuncTypeX , typename FuncTypeY , typename FuncTypeZ , typename BoundType > requires requires { func_x( BoundType{}, BoundType{}, BoundType{}); func_y( BoundType{}, BoundType{}, BoundType{}); func_z( BoundType{}, BoundType{}, BoundType{}); } | |
auto | cpg::numerical_analysis::divs (FuncTypeX &&func_x, FuncTypeY &&func_y, FuncTypeZ &&func_z, std::array< BoundType, 2 > bound_x, std::array< BoundType, 2 > bound_y, std::array< BoundType, 2 > bound_z) |
template<typename FuncType , cpt::arithmetic_c BoundType> | |
BoundType | cpg::numerical_analysis::simpson_rule (FuncType &&f, BoundType a, BoundType b) noexcept |
template<typename FuncType , cpt::arithmetic_c BoundType> | |
BoundType | cpg::numerical_analysis::adaptive_simpson_quadrature (FuncType &&f, BoundType a, BoundType b) |