funcy  1.6.1
Public Member Functions | List of all members
funcy::Pow< dividend, divisor > Struct Template Reference

Power function with rational exponent \( k = \frac{dividend}{divisor} \) including first three derivatives. More...

#include <pow.h>

Inheritance diagram for funcy::Pow< dividend, divisor >:
Inheritance graph
[legend]
Collaboration diagram for funcy::Pow< dividend, divisor >:
Collaboration graph
[legend]

Public Member Functions

 Pow (double x=1) FUNCY_NOEXCEPT
 Constructor. More...
 
void update (double x) FUNCY_NOEXCEPT
 Set point of evaluation. More...
 
double d0 () const noexcept
 Function value. More...
 
double d1 (double dx=1.) const noexcept
 First (directional) derivative. More...
 
double d2 (double dx=1., double dy=1.) const noexcept
 Second (directional) derivative. More...
 
double d3 (double dx=1., double dy=1., double dz=1.) const noexcept
 Third (directional) derivative. More...
 

Detailed Description

template<int dividend, int divisor = 1>
struct funcy::Pow< dividend, divisor >

Power function with rational exponent \( k = \frac{dividend}{divisor} \) including first three derivatives.

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. For the cases \(k=-1\) and \(k=2\) specializations are used that avoid the use of std::pow.

Constructor & Destructor Documentation

◆ Pow()

template<int dividend, int divisor = 1>
funcy::Pow< dividend, divisor >::Pow ( double  x = 1)
inlineexplicit

Constructor.

Parameters
xpoint of evaluation

Member Function Documentation

◆ d0()

template<int dividend, int divisor = 1>
double funcy::Pow< dividend, divisor >::d0 ( ) const
inlinenoexcept

Function value.

◆ d1()

template<int dividend, int divisor = 1>
double funcy::Pow< dividend, divisor >::d1 ( double  dx = 1.) const
inlinenoexcept

First (directional) derivative.

◆ d2()

template<int dividend, int divisor = 1>
double funcy::Pow< dividend, divisor >::d2 ( double  dx = 1.,
double  dy = 1. 
) const
inlinenoexcept

Second (directional) derivative.

◆ d3()

template<int dividend, int divisor = 1>
double funcy::Pow< dividend, divisor >::d3 ( double  dx = 1.,
double  dy = 1.,
double  dz = 1. 
) const
inlinenoexcept

Third (directional) derivative.

◆ update()

template<int dividend, int divisor = 1>
void funcy::Pow< dividend, divisor >::update ( double  x)
inline

Set point of evaluation.


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