A.I.M.S


mathelem.h File Reference
#include <cstdlib>
#include <aims/config/aimsdata_config.h>
#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.
 

Functions

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

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

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

Definition at line 312 of file mathelem.h.

AIMSDATA_API int AimsNextPowerOfTwo ( int  number)

Return the next power of two closest to an integer.

AIMSDATA_API double AimsSigmoid ( double  x)

Sigmoidal function (useful for neural networks)

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

Definition at line 340 of file mathelem.h.

Referenced by volumeRatio().

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

Definition at line 347 of file mathelem.h.

References square().

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

Definition at line 333 of file mathelem.h.

Referenced by pythagore().