26namespace func_sketch::math {
38 [[nodiscard]]
static std::string_view
name() noexcept {
return "identity"; }
61 [[nodiscard]]
static std::string_view
name() noexcept {
return "negate"; }
70 std::visit([&result](
const auto& value) { result = -value; }, arg);
Class of unary minus operator.
static void operator()(const Number &arg, Number &result)
Operate on a scalar.
static std::string_view name() noexcept
Get the name of the operator.
Class of unary plus operator.
static std::string_view name() noexcept
Get the name of the operator.
static void operator()(const Number &arg, Number &result) noexcept
Operate on a scalar.
Definitions of common types.
std::variant< Integer, Real, Complex > Number
Type of numbers.