29namespace func_sketch::math {
42 template <UnaryOperatorType T>
45 get_name_([](const utilities::Any& obj) -> std::string_view {
46 return obj.get<T>().
name();
49 Number& result) { obj.
get<T>()(arg, result); }) {
utilities::Any operator_
Operator object.
std::string_view name() const
Get the name of the operator.
std::string_view( const utilities::Any &) GetNameSignature
Signature of function to get the name of the operator.
void operator()(const Number &arg, Number &result) const
Operate on a scalar.
void( const utilities::Any &, const Number &, Number &) ScalarOperatorSignature
Signature of function to operate on a scalar.
GetNameSignature * get_name_
Function to get the name of the operator.
UnaryOperator(T operator_object)
Constructor.
ScalarOperatorSignature * scalar_operator_
Function to operate on a scalar.
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 UnaryOperatorType concept.