33 #if defined(BasicMathFunctions_RECURSES)
34 #error Recursive header files inclusion detected in BasicMathFunctions.h
35 #else // defined(BasicMathFunctions_RECURSES)
37 #define BasicMathFunctions_RECURSES
39 #if !defined BasicMathFunctions_h
41 #define BasicMathFunctions_h
47 #include "DGtal/base/Common.h"
48 #include "DGtal/base/Bits.h"
49 #include "DGtal/kernel/NumberTraits.h"
73 T
power(
const T&aVal,
const unsigned int exponent)
75 unsigned int q=exponent;
78 if (exponent == 0) {
return 1; }
131 template <
typename T>
142 template <
typename T>
145 {
return x * x * x; }
154 #endif // !defined BasicMathFunctions_h
156 #undef BasicMathFunctions_RECURSES
157 #endif // else defined(BasicMathFunctions_RECURSES)
Aim: The traits class for all models of Cinteger.
Go to http://www.sgi.com/tech/stl/LessThanComparable.html.
static unsigned int mostSignificantBit(DGtal::uint8_t n)
T roundToUpperPowerOfTwo(const T &n)
DGtal is the top-level namespace which contains all DGtal functions and types.
T power(const T &aVal, const unsigned int exponent)