33#if defined(BasicMathFunctions_RECURSES)
34#error Recursive header files inclusion detected in BasicMathFunctions.h
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; }
156#undef BasicMathFunctions_RECURSES
T power(const T &aVal, const unsigned int exponent)
T roundToUpperPowerOfTwo(const T &n)
DGtal is the top-level namespace which contains all DGtal functions and types.
static unsigned int mostSignificantBit(DGtal::uint8_t n)
Aim: The traits class for all models of Cinteger.
Go to http://www.sgi.com/tech/stl/LessThanComparable.html.