3 #include <funcy/util/chainer.h> 11 template <
class Arg >
21 Identity(
const Arg& x ) noexcept( std::is_copy_constructible_v< Arg > ) : x_( x )
29 Identity( Arg&& x ) noexcept( std::is_move_constructible_v< Arg > ) : x_( std::move( x ) )
40 const Arg&
d0() const noexcept
47 const Arg&
d1(
const Arg& dx )
const noexcept
57 template <
class Arg >
60 return Identity( std::forward< Arg >( x ) );
void update(const Arg &x)
Reset point of evaluation.
Definition: identity.h:34
auto identity(Arg &&x)
Construct Identity<Arg>(x).
Definition: identity.h:58
Identity()=default
Default constructor.
const Arg & d0() const noexcept
Function value.
Definition: identity.h:40
Identity(Arg &&x) noexcept(std::is_move_constructible_v< Arg >)
Constructor.
Definition: identity.h:29
Identity(const Arg &x) noexcept(std::is_copy_constructible_v< Arg >)
Constructor.
Definition: identity.h:21
Main namespace of the funcy library.
Identity mapping .
Definition: identity.h:12
const Arg & d1(const Arg &dx) const noexcept
First directional derivative.
Definition: identity.h:47