30namespace func_sketch::math {
43 template <MathFunctionType T>
46 get_name_([](const utilities::Any& obj) -> std::string_view {
47 return obj.get<T>().
name();
51 Number& result) { obj.
get<T>()(args, result); }) {}
78 const std::vector<Number>& ,
Number& );
std::string_view( const utilities::Any &) GetNameSignature
Signature of function to get the name of the function.
std::string_view name() const
Get the name of the function.
GetNameSignature * get_name_
Function to get the name of the function.
void operator()(const std::vector< Number > &args, Number &result) const
Operate on scalars.
MathFunction(T function)
Constructor.
utilities::Any function_
Function object.
ScalarOperatorSignature * scalar_operator_
Function to operate on scalars.
void( const utilities::Any &, const std::vector< Number > &, Number &) ScalarOperatorSignature
Signature of function to operate on scalars.
Class to store any type of value.
const T & get() const
Get the stored value.
Definitions of common types.
std::variant< Integer, Real, Complex > Number
Type of numbers.
Definition of MathFunctionType concept.