aimsdata  5.0.5
Neuroimaging data handling
mathelem.h File Reference
#include <aims/config/aimsdata_config.h>
#include <cartobase/type/converter.h>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <limits>
Include dependency graph for mathelem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  aims::MathUtil< T >
 Defines basic math functions that run on iterators. More...
 

Namespaces

 aims
 The class for EcatSino data write operation.
 
 aims::internal
 

Functions

template<typename T >
bool aims::internal::is_min (T a, T b)
 
template<class T >
square (const T &val)
 
template<class T >
cube (const T &val)
 
template<class T >
pythagore (const T &a, const T &b)
 
Square, cube, ...
template<typename T >
aims::sqr (const T &x)
 Get the square of x. More...
 
template<typename T >
aims::cub (const T &x)
 Get the cube of x. More...
 
template<typename T >
float aims::sgn (const T &x)
 Get the sign of x. More...
 
template<typename T >
aims::absdiff (const T &x, const T &y)
 Get the absolute difference between 2 values without having to take care of used type this is particularly useful for unsigned types. More...
 
Trigonometry
template<class T >
double AimsArgument (T re, T im)
 Get the argument of a complex re + i.im. More...
 
Miscellaneous functions
AIMSDATA_API int AimsNextPowerOfTwo (int number)
 Return the next power of two closest to an integer. More...
 
AIMSDATA_API double AimsSigmoid (double x)
 Sigmoidal function (useful for neural networks) More...
 

Function Documentation

◆ AimsArgument()

template<class T >
double AimsArgument ( re,
im 
)
inline

Get the argument of a complex re + i.im.

Definition at line 313 of file mathelem.h.

Referenced by aims::MathUtil< T >::stdev().

◆ AimsNextPowerOfTwo()

AIMSDATA_API int AimsNextPowerOfTwo ( int  number)

Return the next power of two closest to an integer.

Referenced by pythagore().

◆ AimsSigmoid()

AIMSDATA_API double AimsSigmoid ( double  x)

Sigmoidal function (useful for neural networks)

Referenced by pythagore().

◆ cube()

template<class T >
T cube ( const T &  val)
inline

Definition at line 341 of file mathelem.h.

Referenced by volumeRatio().

◆ pythagore()

template<class T >
T pythagore ( const T &  a,
const T &  b 
)
inline

Definition at line 348 of file mathelem.h.

References AIMSDATA_API, AimsNextPowerOfTwo(), AimsSigmoid(), and square().

◆ square()

template<class T >
T square ( const T &  val)
inline

Definition at line 334 of file mathelem.h.

Referenced by pythagore().