funcy  1.6.1
Public Member Functions | Public Attributes | List of all members
funcy::mathop::Chain< F, G > Struct Template Reference

Chain \( f\circ g \) of functions \(f\) and \(g\) of type F resp. G. More...

#include <chain.h>

Inheritance diagram for funcy::mathop::Chain< F, G >:
Inheritance graph
[legend]
Collaboration diagram for funcy::mathop::Chain< F, G >:
Collaboration graph
[legend]

Public Member Functions

constexpr Chain (const F &f_, const G &g_)
 Constructor taking copies of the functions to be chained. More...
 
constexpr Chain (const F &f_, G &&g_)
 Constructor taking moving the functions to be chained. More...
 
constexpr Chain (F &&f_, const G &g_)
 Constructor taking moving the functions to be chained. More...
 
constexpr Chain (F &&f_, G &&g_)
 Constructor taking moving the functions to be chained. More...
 
template<class Arg >
void update (const Arg &x)
 Update point of evaluation.
 
template<int index, class Arg >
void update (const Arg &x)
 Update variable corresponding to index.
 
template<class... IndexedArgs>
void bulk_update (IndexedArgs &&... args)
 
template<int id, class Arg , class IndexedArg = IndexedType< Arg, id >, class IndexedFArg = IndexedType< FArg, id >>
auto d1 (Arg const &dx) const requires(ComputeChainD1< F
 First directional derivative. More...
 
template<int idx, int idy, class ArgX , class ArgY , class IndexedArgX = IndexedType< ArgX, idx >, class IndexedArgY = IndexedType< ArgY, idy >, class IndexedFArgX = IndexedType< FArg, idx >, class IndexedFArgY = IndexedType< FArg, idy >>
auto d2 (ArgX const &dx, ArgY const &dy) const requires(D2LazyType< IndexedArgX
 Second directional derivative. More...
 
template<int idx, int idy, int idz, class ArgX , class ArgY , class ArgZ , class IndexedArgX = IndexedType< ArgX, idx >, class IndexedArgY = IndexedType< ArgY, idy >, class IndexedArgZ = IndexedType< ArgZ, idz >, class IndexedFArgX = IndexedType< FArg, idx >, class IndexedFArgY = IndexedType< FArg, idy >, class IndexedFArgZ = IndexedType< FArg, idz >>
auto d3 (ArgX const &dx, ArgY const &dy, ArgZ const &dz) const requires(D3LazyType< IndexedArgX
 Third directional derivative. More...
 
D1< G, IndexedArgY > dGdy (g, dy)
 
D1< G, IndexedArgZ > dGdz (g, dz)
 
return sum (chain< IndexedFArgX, IndexedFArgY, IndexedFArgZ >(f, dGdx, dGdy, dGdz), chain< IndexedFArgX, IndexedFArgY >(f, D2< G, IndexedArgX, IndexedArgZ >(g, dx, dz), dGdy), chain< IndexedFArgX, IndexedFArgY >(f, dGdx, D2< G, IndexedArgY, IndexedArgZ >(g, dy, dz)), chain< IndexedFArgX, IndexedFArgZ >(f, D2< G, IndexedArgX, IndexedArgY >(g, dx, dy), dGdz), chain< IndexedFArgX >(f, D3< G, IndexedArgX, IndexedArgY, IndexedArgZ >(g, dx, dy, dz)))()
 

Public Attributes

auto D1< G, IndexedArg >
 
auto IndexedArgY
 
auto IndexedFArgX
 
auto IndexedArgZ
 
auto IndexedFArgY
 

Detailed Description

template<Function F, Function G>
struct funcy::mathop::Chain< F, G >

Chain \( f\circ g \) of functions \(f\) and \(g\) of type F resp. G.

Constructor & Destructor Documentation

◆ Chain() [1/4]

template<Function F, Function G>
constexpr funcy::mathop::Chain< F, G >::Chain ( const F &  f_,
const G &  g_ 
)
inline

Constructor taking copies of the functions to be chained.

Parameters
f_outer function
g_inner function

◆ Chain() [2/4]

template<Function F, Function G>
constexpr funcy::mathop::Chain< F, G >::Chain ( const F &  f_,
G &&  g_ 
)
inline

Constructor taking moving the functions to be chained.

Parameters
f_outer function
g_inner function

◆ Chain() [3/4]

template<Function F, Function G>
constexpr funcy::mathop::Chain< F, G >::Chain ( F &&  f_,
const G &  g_ 
)
inline

Constructor taking moving the functions to be chained.

Parameters
f_outer function
g_inner function

◆ Chain() [4/4]

template<Function F, Function G>
constexpr funcy::mathop::Chain< F, G >::Chain ( F &&  f_,
G &&  g_ 
)
inline

Constructor taking moving the functions to be chained.

Parameters
f_outer function
g_inner function

Member Function Documentation

◆ d1()

template<Function F, Function G>
template<int id, class Arg , class IndexedArg = IndexedType< Arg, id >, class IndexedFArg = IndexedType< FArg, id >>
auto funcy::mathop::Chain< F, G >::d1 ( Arg const &  dx) const

First directional derivative.

Parameters
dxdirection for which the derivative is computed

◆ d2()

template<Function F, Function G>
template<int idx, int idy, class ArgX , class ArgY , class IndexedArgX = IndexedType< ArgX, idx >, class IndexedArgY = IndexedType< ArgY, idy >, class IndexedFArgX = IndexedType< FArg, idx >, class IndexedFArgY = IndexedType< FArg, idy >>
auto funcy::mathop::Chain< F, G >::d2 ( ArgX const &  dx,
ArgY const &  dy 
) const

Second directional derivative.

Parameters
dxdirection for which the derivative is computed
dydirection for which the derivative is computed

◆ d3()

template<Function F, Function G>
template<int idx, int idy, int idz, class ArgX , class ArgY , class ArgZ , class IndexedArgX = IndexedType< ArgX, idx >, class IndexedArgY = IndexedType< ArgY, idy >, class IndexedArgZ = IndexedType< ArgZ, idz >, class IndexedFArgX = IndexedType< FArg, idx >, class IndexedFArgY = IndexedType< FArg, idy >, class IndexedFArgZ = IndexedType< FArg, idz >>
auto funcy::mathop::Chain< F, G >::d3 ( ArgX const &  dx,
ArgY const &  dy,
ArgZ const &  dz 
) const

Third directional derivative.

Parameters
dxdirection for which the derivative is computed
dydirection for which the derivative is computed
dzdirection for which the derivative is computed

The documentation for this struct was generated from the following file: