aimsdata 6.0.0
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

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

Functions

template<typename T>
bool aims::internal::is_min (T a, T b)
 
Square, cube, ...
template<typename T>
aims::sqr (const T &x)
 Get the square of x.
 
template<typename T>
aims::cub (const T &x)
 Get the cube of x.
 
template<typename T>
float aims::sgn (const T &x)
 Get the sign of x.
 
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.
 
Trigonometry
template<class T>
double AimsArgument (T re, T im)
 Get the argument of a complex re + i.im.
 
template<class T>
square (const T &val)
 
template<class T>
cube (const T &val)
 
template<class T>
pythagore (const T &a, const T &b)
 
Miscellaneous functions
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)
 

Function Documentation

◆ AimsArgument()

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

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

Definition at line 351 of file mathelem.h.

◆ AimsNextPowerOfTwo()

AIMSDATA_API int AimsNextPowerOfTwo ( int number)

Return the next power of two closest to an integer.

References AIMSDATA_API.

◆ AimsSigmoid()

AIMSDATA_API double AimsSigmoid ( double x)

Sigmoidal function (useful for neural networks)

References AIMSDATA_API.

◆ cube()

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

Definition at line 379 of file mathelem.h.

Referenced by volumeRatio().

◆ pythagore()

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

Definition at line 386 of file mathelem.h.

References square().

◆ square()

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

Definition at line 372 of file mathelem.h.

Referenced by pythagore().