C++ Library Extensions 2022.12.09
To help learn modern C++ programming
cpg::numerical_analysis Namespace Reference

Namespaces

namespace  commands
 

Classes

class  d3vctr
 
struct  delta
 

Functions

template<typename Type >
constexpr Type positive_infinity (Type v)
 
template<typename Type >
constexpr Type negative_infinity (Type v)
 
template<typename Type >
constexpr Type positive_approach (Type value)
 
template<typename Type >
constexpr Type 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 weights_abscissae () noexcept
 
template<std::size_t WeightCount = 21, typename FunctionType = double(&)(double), typename ValueType = double>
ValueType gaussian_quadrature (FunctionType &&f, ValueType x1, ValueType x2)
 
template<std::size_t WeightCount = 12, typename FuncType = double(&)(double), cpt::arithmetic_c BoundType = double>
BoundType 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 smart_apply (FuncType &&func, TupleType arg)
 
template<typename FuncType , cpt::arithmetic_c ArgType>
requires (cpt::arithmetic_c<FuncType> || std::invocable<FuncType, ArgType>)
auto evaluate (FuncType &&f, ArgType arg1)
 
template<typename FuncType , cpt::arithmetic_c ArgType>
requires (cpt::arithmetic_c<FuncType> || std::invocable<FuncType, ArgType, ArgType>)
auto 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 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 evaluate (FuncType &&f, ArgType arg1, ArgType arg2, ArgType arg3, ArgType arg4)
 
template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType>
auto evaluate (std::tuple< FuncType1, FuncType2 > funcs, ArgType arg1)
 
template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType>
auto evaluate (std::tuple< FuncType1, FuncType2 > funcs, ArgType arg1, ArgType arg2)
 
template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType>
auto evaluate (std::tuple< FuncType1, FuncType2 > funcs, ArgType arg1, ArgType arg2, ArgType arg3)
 
template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType>
auto 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 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 > 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 > 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 > 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 get_delta (delta< DeltaType > del) noexcept
 
template<typename CountType , typename BoundType >
BoundType compute_delta (CountType count, std::array< BoundType, 2 > &bound) noexcept
 
template<typename Type >
Type adjust_integer (auto arg) noexcept
 
template<typename Type >
Type adjust_zero (auto arg) noexcept
 
template<typename SeqType , typename... SeqTypes>
constexpr auto create_command (SeqType, SeqTypes...) noexcept
 
template<std::size_t Order, typename FuncType , typename ArgType >
auto nine_point_stencil (FuncType &&f, ArgType x) noexcept
 
template<std::size_t Order, typename FuncType , typename ArgType >
auto seven_point_stencil (FuncType &&f, ArgType x) noexcept
 
template<std::size_t Order, typename FunctionType , typename ArgType >
ArgType five_point_stencil (FunctionType &&f, ArgType x) noexcept
 
template<auto VarIndex, typename FuncType , cpt::arithmetic_c... ArgTypes>
auto fix_variables_other_than_VarIndex_ed (FuncType &&func, ArgTypes... args) noexcept
 
template<auto VarIndex, typename FuncType , cpt::arithmetic_c... ArgTypes>
auto 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 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 partial_derivative (cpt::sequence< VarIndex, Order >, FuncType &&func, ArgTypes... args) noexcept
 
template<auto VarIndex, auto Order, typename FuncType , cpt::arithmetic_c... ArgTypes>
auto 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 partial_derivative (cpt::sequence< VarIndex, Order >, FuncType &&func, std::array< ArgType, N > args) noexcept
 
template<typename VarOdr , typename FuncType , cpt::arithmetic_c... ArgTypes>
auto partial_derivative (cpt::type_container< VarOdr >, FuncType &&func, ArgTypes... args) noexcept
 
template<typename VarOdr , typename FuncType , cpt::arithmetic_c... ArgTypes>
auto 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 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 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 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 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 directional_derivative (FuncType &&f, std::tuple< VariableTypes... > const &vars, ParamType param)
 
template<typename... CmdTypes, typename FuncType , typename... VariableTypes, typename... ParamTypes>
auto 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 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 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 gradient (FuncType &&function, ArgTypes... args) noexcept
 
template<typename FuncType , cpt::arithmetic_c... ArgTypes>
requires ( std::is_invocable_v<FuncType, ArgTypes...> )
auto gradient (FuncType &&function, const std::tuple< ArgTypes... > &args) noexcept
 
template<typename FuncType , cpt::arithmetic_c ArgType, std::size_t N>
auto 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 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 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 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 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 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 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 evaluate (FuncType &&func, std::size_t N, std::array< BoundType, 2 > bound)
 
template<std::size_t VarIndex, typename FuncType , typename BoundType , typename... ArgTypes>
auto 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 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 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 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 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 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 simpson_rule (FuncType &&f, BoundType a, BoundType b) noexcept
 
template<typename FuncType , cpt::arithmetic_c BoundType>
BoundType adaptive_simpson_quadrature (FuncType &&f, BoundType a, BoundType b)
 

Variables

template<typename Type >
constexpr Type positive_zero = std::numeric_limits<Type>::epsilon()
 
template<typename Type >
constexpr Type negative_zero = -std::numeric_limits<Type>::epsilon()
 

Function Documentation

◆ adaptive_gaussian_quadrature()

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 
)

Definition at line 572 of file cpg_calculus.hpp.

◆ adaptive_simpson_quadrature()

template<typename FuncType , cpt::arithmetic_c BoundType>
BoundType cpg::numerical_analysis::adaptive_simpson_quadrature ( FuncType &&  f,
BoundType  a,
BoundType  b 
)

Definition at line 2465 of file cpg_calculus.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjust_integer()

template<typename Type >
Type cpg::numerical_analysis::adjust_integer ( auto  arg)
noexcept

Definition at line 891 of file cpg_calculus.hpp.

◆ adjust_zero()

template<typename Type >
Type cpg::numerical_analysis::adjust_zero ( auto  arg)
noexcept

Definition at line 898 of file cpg_calculus.hpp.

◆ compute_delta()

template<typename CountType , typename BoundType >
BoundType cpg::numerical_analysis::compute_delta ( CountType  count,
std::array< BoundType, 2 > &  bound 
)
noexcept

Definition at line 874 of file cpg_calculus.hpp.

◆ create_command()

template<typename SeqType , typename... SeqTypes>
constexpr auto cpg::numerical_analysis::create_command ( SeqType  ,
SeqTypes...   
)
constexprnoexcept

Definition at line 919 of file cpg_calculus.hpp.

Here is the caller graph for this function:

◆ curl() [1/3]

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

Definition at line 1613 of file cpg_calculus.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ curl() [2/3]

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

Definition at line 1654 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ curl() [3/3]

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

Definition at line 1641 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ curls()

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 
)

Definition at line 2300 of file cpg_calculus.hpp.

◆ differentiate() [1/2]

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 
)

Definition at line 2150 of file cpg_calculus.hpp.

Here is the caller graph for this function:

◆ differentiate() [2/2]

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 
)

Definition at line 2189 of file cpg_calculus.hpp.

◆ directional_derivative()

template<typename FuncType , typename... VariableTypes, typename ParamType >
auto cpg::numerical_analysis::directional_derivative ( FuncType &&  f,
std::tuple< VariableTypes... > const &  vars,
ParamType  param 
)

Definition at line 1480 of file cpg_calculus.hpp.

Here is the caller graph for this function:

◆ divergence() [1/3]

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

Definition at line 1672 of file cpg_calculus.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ divergence() [2/3]

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

Definition at line 1708 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ divergence() [3/3]

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

Definition at line 1695 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ divs()

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 
)

Definition at line 2370 of file cpg_calculus.hpp.

◆ evaluate() [1/10]

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 
)

Definition at line 614 of file cpg_calculus.hpp.

Here is the caller graph for this function:

◆ evaluate() [2/10]

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 
)

Definition at line 627 of file cpg_calculus.hpp.

◆ evaluate() [3/10]

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 
)

Definition at line 640 of file cpg_calculus.hpp.

◆ evaluate() [4/10]

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 
)

Definition at line 653 of file cpg_calculus.hpp.

◆ evaluate() [5/10]

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 
)

Definition at line 2083 of file cpg_calculus.hpp.

◆ evaluate() [6/10]

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 
)

Definition at line 2113 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ evaluate() [7/10]

template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType>
auto cpg::numerical_analysis::evaluate ( std::tuple< FuncType1, FuncType2 >  funcs,
ArgType  arg1 
)

Definition at line 666 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ evaluate() [8/10]

template<typename FuncType1 , typename FuncType2 , cpt::arithmetic_c ArgType>
auto cpg::numerical_analysis::evaluate ( std::tuple< FuncType1, FuncType2 >  funcs,
ArgType  arg1,
ArgType  arg2 
)

Definition at line 674 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ evaluate() [9/10]

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 
)

Definition at line 682 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ evaluate() [10/10]

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 
)

Definition at line 690 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ five_point_stencil()

template<std::size_t Order, typename FunctionType , typename ArgType >
ArgType cpg::numerical_analysis::five_point_stencil ( FunctionType &&  f,
ArgType  x 
)
noexcept

Definition at line 1282 of file cpg_calculus.hpp.

◆ fix_variables_other_than_VarIndex_ed() [1/3]

template<auto VarIndex, typename FuncType , cpt::arithmetic_c... ArgTypes>
auto cpg::numerical_analysis::fix_variables_other_than_VarIndex_ed ( FuncType &&  func,
ArgTypes...  args 
)
noexcept

Definition at line 1341 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ fix_variables_other_than_VarIndex_ed() [2/3]

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

Definition at line 1365 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ fix_variables_other_than_VarIndex_ed() [3/3]

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

Definition at line 1354 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ gaussian_quadrature()

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 
)

Definition at line 552 of file cpg_calculus.hpp.

◆ get_delta()

template<auto Order, typename DeltaType >
constexpr auto cpg::numerical_analysis::get_delta ( delta< DeltaType >  del)
inlineconstexprnoexcept

Definition at line 849 of file cpg_calculus.hpp.

◆ gradient() [1/3]

template<typename FuncType , cpt::arithmetic_c... ArgTypes>
requires ( std::is_invocable_v<FuncType, ArgTypes...> )
auto cpg::numerical_analysis::gradient ( FuncType &&  function,
ArgTypes...  args 
)
noexcept

Definition at line 1563 of file cpg_calculus.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gradient() [2/3]

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

Definition at line 1596 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ gradient() [3/3]

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

Definition at line 1585 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ gradients()

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 
)

Definition at line 2234 of file cpg_calculus.hpp.

◆ integral() [1/4]

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 
)

Definition at line 700 of file cpg_calculus.hpp.

◆ integral() [2/4]

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 >   
)

Definition at line 726 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ integral() [3/4]

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 >   
)

Definition at line 757 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ integral() [4/4]

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 >   
)

Definition at line 796 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ negative_approach()

template<typename Type >
constexpr Type cpg::numerical_analysis::negative_approach ( Type  value)
inlineconstexpr

Definition at line 54 of file cpg_calculus.hpp.

◆ negative_infinity()

template<typename Type >
constexpr Type cpg::numerical_analysis::negative_infinity ( Type  v)
inlineconstexpr

Definition at line 40 of file cpg_calculus.hpp.

◆ nine_point_stencil()

template<std::size_t Order, typename FuncType , typename ArgType >
auto cpg::numerical_analysis::nine_point_stencil ( FuncType &&  f,
ArgType  x 
)
noexcept

Definition at line 1082 of file cpg_calculus.hpp.

◆ parametric_derivative() [1/3]

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 
)

Definition at line 1500 of file cpg_calculus.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parametric_derivative() [2/3]

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 
)

Definition at line 1540 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ parametric_derivative() [3/3]

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 
)

Definition at line 1520 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ partial_derivative() [1/9]

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

Definition at line 1376 of file cpg_calculus.hpp.

Here is the caller graph for this function:

◆ partial_derivative() [2/9]

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

Definition at line 1395 of file cpg_calculus.hpp.

◆ partial_derivative() [3/9]

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

Definition at line 1385 of file cpg_calculus.hpp.

◆ partial_derivative() [4/9]

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

Definition at line 1428 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ partial_derivative() [5/9]

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

Definition at line 1416 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ partial_derivative() [6/9]

template<typename VarOdr , typename FuncType , cpt::arithmetic_c... ArgTypes>
auto cpg::numerical_analysis::partial_derivative ( cpt::type_container< VarOdr >  ,
FuncType &&  func,
ArgTypes...  args 
)
noexcept

Definition at line 1404 of file cpg_calculus.hpp.

◆ partial_derivative() [7/9]

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

Definition at line 1467 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ partial_derivative() [8/9]

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

Definition at line 1454 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ partial_derivative() [9/9]

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

Definition at line 1441 of file cpg_calculus.hpp.

Here is the call graph for this function:

◆ positive_approach()

template<typename Type >
constexpr Type cpg::numerical_analysis::positive_approach ( Type  value)
inlineconstexpr

Definition at line 47 of file cpg_calculus.hpp.

◆ positive_infinity()

template<typename Type >
constexpr Type cpg::numerical_analysis::positive_infinity ( Type  v)
inlineconstexpr

Definition at line 34 of file cpg_calculus.hpp.

◆ seven_point_stencil()

template<std::size_t Order, typename FuncType , typename ArgType >
auto cpg::numerical_analysis::seven_point_stencil ( FuncType &&  f,
ArgType  x 
)
noexcept

Definition at line 1198 of file cpg_calculus.hpp.

◆ simpson_rule()

template<typename FuncType , cpt::arithmetic_c BoundType>
BoundType cpg::numerical_analysis::simpson_rule ( FuncType &&  f,
BoundType  a,
BoundType  b 
)
noexcept

Definition at line 2436 of file cpg_calculus.hpp.

Here is the caller graph for this function:

◆ smart_apply()

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 
)

Definition at line 604 of file cpg_calculus.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ weights_abscissae()

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 ( )
constexprnoexcept

Definition at line 79 of file cpg_calculus.hpp.

Variable Documentation

◆ negative_zero

template<typename Type >
constexpr Type cpg::numerical_analysis::negative_zero = -std::numeric_limits<Type>::epsilon()
constexpr

Definition at line 63 of file cpg_calculus.hpp.

◆ positive_zero

template<typename Type >
constexpr Type cpg::numerical_analysis::positive_zero = std::numeric_limits<Type>::epsilon()
constexpr

Definition at line 60 of file cpg_calculus.hpp.