funcy  1.6.1
Namespaces | Classes | Typedefs | Functions
Common Mathematical Functions

Wrappers for functions from <cmath>. More...

Collaboration diagram for Common Mathematical Functions:

Namespaces

 funcy::mathop
 Mathematical operations and corresponding differentation rules.
 

Classes

struct  funcy::ACos
 Arc cosine function (based on acos(double) in <cmath>). More...
 
struct  funcy::ASin
 Arc sine function (based on asin(double) in <cmath>). More...
 
struct  funcy::CumulativeNormalDistribution
 Cumulative standard normal distribution. More...
 
struct  funcy::Cos
 Cosine function (based on cos(double) in <cmath>). More...
 
struct  funcy::Erf
 Error function. More...
 
struct  funcy::Exp
 Exponential function. More...
 
struct  funcy::Exp2
 Function \(2^x\). More...
 
struct  funcy::LN
 Natural logarithm. More...
 
struct  funcy::Log10
 Common (base 10) logarithm. More...
 
struct  funcy::Log2
 Base 2 logarithm. More...
 
struct  funcy::Pow< dividend, divisor >
 Power function with rational exponent \( k = \frac{dividend}{divisor} \) including first three derivatives. More...
 
struct  funcy::Sin
 Sine function (based on sin(double) in <cmath>). More...
 
struct  funcy::Tan
 Tangent function. More...
 

Typedefs

using funcy::Sqrt = Pow< 1, 2 >
 Square root (based on sqrt(double) in <cmath>).
 
using funcy::Cbrt = Pow< 1, 3 >
 Third root (based on sqrt(double) in <cmath>).
 
using funcy::Cbrt2 = Pow< 2, 3 >
 Third root squared (based on sqrt(double) in <cmath>).
 

Functions

template<Function F>
auto funcy::acos (const F &f)
 Generate \( \arccos\circ f \). More...
 
template<Function F>
auto funcy::asin (const F &f)
 Generate \( \arcsin\circ f \). More...
 
template<Function F>
auto funcy::cnd (const F &f)
 Generate \( \mathrm{cnd}\circ f \). More...
 
template<Function F>
auto funcy::cos (const F &f)
 Generate \( \cos\circ f \). More...
 
template<Function F>
auto funcy::erf (const F &f)
 Generate \( \mathrm{erf}\circ f \). More...
 
template<Function F>
auto funcy::exp (const F &f)
 Generate \( \exp(f) \). More...
 
template<Function F>
auto funcy::exp2 (const F &f)
 Generate \(2^f\). More...
 
template<Function F>
auto funcy::ln (const F &f)
 Generate \( \mathrm{ln}\circ f \). More...
 
template<Function F>
auto funcy::log10 (const F &f)
 Generate \( \mathrm{log}_{10}\circ f \). More...
 
template<Function F>
auto funcy::log2 (const F &f)
 Generate \( \mathrm{log}_{2}\circ f \). More...
 
template<Function F>
auto funcy::sqrt (const F &f)
 Generate \( \sqrt{f} \). More...
 
template<Function F>
auto funcy::cbrt (const F &f)
 Generate \( \sqrt[3]{f} \). More...
 
template<Function F>
auto funcy::cbrt2 (const F &f)
 Generate \( \sqrt[3]{f^2}\). More...
 
template<int k, int l, Function F>
auto funcy::pow (const F &f)
 Generate \( f^{k/l}\). More...
 
template<int k, Function F>
auto funcy::pow (const F &f)
 Generate \( f^k,\ k \in \mathbb{N}\). More...
 
template<Function F>
auto funcy::sin (const F &f)
 Generate \( \sin\circ f \). More...
 
template<Function F>
auto funcy::tan (const F &f)
 Generate \( \tan\circ f \). More...
 
template<Function F, Function G>
decltype(auto) funcy::max (F &&f, G &&g)
 
template<Function F, Function G>
decltype(auto) funcy::min (F &&f, G &&g)
 

Detailed Description

Wrappers for functions from <cmath>.

Function Documentation

◆ acos()

template<Function F>
auto funcy::acos ( const F &  f)

Generate \( \arccos\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<ACos,F>

◆ asin()

template<Function F>
auto funcy::asin ( const F &  f)

Generate \( \arcsin\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<ASin,Function>

◆ cbrt()

template<Function F>
auto funcy::cbrt ( const F &  f)

Generate \( \sqrt[3]{f} \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Cbrt,Function>

◆ cbrt2()

template<Function F>
auto funcy::cbrt2 ( const F &  f)

Generate \( \sqrt[3]{f^2}\).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Cbrt2,Function>

◆ cnd()

template<Function F>
auto funcy::cnd ( const F &  f)

Generate \( \mathrm{cnd}\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<CumulativeNormalDistribution,Function>

◆ cos()

template<Function F>
auto funcy::cos ( const F &  f)

Generate \( \cos\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Cos,Function>

◆ erf()

template<Function F>
auto funcy::erf ( const F &  f)

Generate \( \mathrm{erf}\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type MathematicalOperations::Chain<Erf,Function>

◆ exp()

template<Function F>
auto funcy::exp ( const F &  f)

Generate \( \exp(f) \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Exp,Function>

◆ exp2()

template<Function F>
auto funcy::exp2 ( const F &  f)

Generate \(2^f\).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Exp2,Function>

◆ ln()

template<Function F>
auto funcy::ln ( const F &  f)

Generate \( \mathrm{ln}\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Log,Function>

◆ log10()

template<Function F>
auto funcy::log10 ( const F &  f)

Generate \( \mathrm{log}_{10}\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Log10,Function>

◆ log2()

template<Function F>
auto funcy::log2 ( const F &  f)

Generate \( \mathrm{log}_{2}\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Log2,Function>

◆ pow() [1/2]

template<int k, int l, Function F>
auto funcy::pow ( const F &  f)

Generate \( f^{k/l}\).

Parameters
ffunction mapping into a scalar space
Template Parameters
kdividend
ldivisor
Returns
object of type mathop::Chain< Pow<dividend,divisor> , Function >

◆ pow() [2/2]

template<int k, Function F>
auto funcy::pow ( const F &  f)

Generate \( f^k,\ k \in \mathbb{N}\).

Parameters
ffunction mapping into a scalar space
Template Parameters
kexponent
Returns
object of type mathop::Chain< Pow<dividend,divisor> , Function >

◆ sin()

template<Function F>
auto funcy::sin ( const F &  f)

Generate \( \sin\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Sin,Function>

◆ sqrt()

template<Function F>
auto funcy::sqrt ( const F &  f)

Generate \( \sqrt{f} \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Sqrt,Function>

◆ tan()

template<Function F>
auto funcy::tan ( const F &  f)

Generate \( \tan\circ f \).

Parameters
ffunction mapping into a scalar space
Returns
object of type mathop::Chain<Tan,Function>