namespace ewalena  0.2.15
ewalena is not an acronym
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Functions
ewalena::Math Namespace Reference

Math utilities. More...

Functions

template<typename ValueType >
ValueType incomplete_gamma (const ValueType scalar)
bool is_even (const int scalar)
bool is_odd (const int scalar)
unsigned int pow (const unsigned int x, const unsigned int y)
template<typename ValueType >
int sgn (const ValueType scalar)

Detailed Description

Math utilities.

Some math utilities and functions.

Author:
Toby D. Young 2012.

Function Documentation

template<typename ValueType >
ValueType ewalena::Math::incomplete_gamma ( const ValueType  scalar)

Return the incomplete gamma function of this scalar number.

bool ewalena::Math::is_even ( const int  scalar)

Return the true (false) if this integer value is even (odd).

bool ewalena::Math::is_odd ( const int  scalar)

Return the true (false) if this integer value is odd (even).

unsigned int ewalena::Math::pow ( const unsigned int  x,
const unsigned int  y 
)

Return $p=x^y$ where $p,x,y\in\{0,{\mathbb I}^+\}$.

template<typename ValueType >
int ewalena::Math::sgn ( const ValueType  scalar)

Return the sign of this scalar number as an integer $\pm1$.

Note:
$\text{sgn}[0]$ is not defined and in that case an exception is triggered. To avoid that, an assertion should always be put in an application code.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines