version 0.4.1
defaultfunctions.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021-2024 The Ikarus Developers mueller@ibb.uni-stuttgart.de
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
9#pragma once
11
12namespace Ikarus::utils {
26{
27 template <typename A, typename B>
28 constexpr auto operator()(A&& a, B&& b) const {
29 return a / b;
30 }
31};
32
46{
47 template <typename A, typename B>
48 constexpr void operator()(A&& a, B&& b) const {
49 using Ikarus::operator+=;
50 a += b;
51 }
52};
53
54} // namespace Ikarus::utils
Helper for the autodiff library.
Definition: algorithms.hh:17
Default functor for solving operations.
Definition: defaultfunctions.hh:26
constexpr auto operator()(A &&a, B &&b) const
Definition: defaultfunctions.hh:28
Default functor for updating operations.
Definition: defaultfunctions.hh:46
constexpr void operator()(A &&a, B &&b) const
Definition: defaultfunctions.hh:48