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

max function \( \max(x,y) \). More...

#include <max.h>

Public Types

using D1G = D1< G, IndexedArg >
 
using D2G = D2< G, IndexedArgX, IndexedArgY >
 
using D3G = D3< G, IndexedArgX, IndexedArgY, IndexedArgZ >
 

Public Member Functions

 Max (const F &f, const G &g)
 Constructor. More...
 
template<class Arg >
void update (Arg &&x)
 Update point of evaluation.
 
template<int index, class Arg >
void update (Arg &&x)
 Update variable corresponding to index.
 
template<class... IndexedArgs>
void bulk_update (IndexedArgs &&... args)
 
double operator() () const noexcept
 Function value. More...
 
template<int id, class Arg , class IndexedArg = IndexedType< std::decay_t< Arg >, id >>
auto d1 (Arg &&dx) const requires(ComputeConditional< D1< F
 First directional derivative.
 
return ComputeConditional (D1F(f_, dx), D1G(g_, dx), f_bigger_than_g_)()
 
template<int idx, int idy, class ArgX , class ArgY , class IndexedArgX = IndexedType< std::decay_t< ArgX >, idx >, class IndexedArgY = IndexedType< std::decay_t< ArgY >, idy >>
auto d2 (ArgX &&dx, ArgY &&dy) const requires(ComputeConditional< D2< F
 Second directional derivative.
 
return ComputeConditional (D2F(f_, dx, dy), D2G(g_, dx, dy), f_bigger_than_g_)()
 
template<int idx, int idy, int idz, class ArgX , class ArgY , class ArgZ , class IndexedArgX = IndexedType< std::decay_t< ArgX >, idx >, class IndexedArgY = IndexedType< std::decay_t< ArgY >, idy >, class IndexedArgZ = IndexedType< std::decay_t< ArgZ >, idz >>
auto d3 (ArgX &&dx, ArgY &&dy, ArgZ &&dz) const requires(ComputeConditional< D3< F
 Third directional derivative.
 
return ComputeConditional (D3F(f_, dx, dy, dz), D3G(g_, dx, dy, dz), f_bigger_than_g_)()
 

Public Attributes

auto IndexedArg
 
auto IndexedArgX
 
auto IndexedArgY
 
auto IndexedArgZ
 

Detailed Description

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

max function \( \max(x,y) \).

For scalar functions directional derivatives are less interesting. Incorporating this function as building block for more complex functions requires directional derivatives. These occur during applications of the chain rule.

Constructor & Destructor Documentation

◆ Max()

template<Function F, Function G>
funcy::mathop::Max< F, G >::Max ( const F &  f,
const G &  g 
)
inlineexplicit

Constructor.

Parameters
xpoint of evaluation

Member Function Documentation

◆ operator()()

template<Function F, Function G>
double funcy::mathop::Max< F, G >::operator() ( ) const
inlinenoexcept

Function value.


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