26 template <
class T>
inline T
Min(
const T& a_a,
29 return (a_a < a_b) ? a_a : a_b;
39 template <
class T>
inline T
Max (
const T& a_a,
42 return (a_a > a_b) ? a_a : a_b;
53 template <
class T>
inline T
Abs(
const T& a_a)
55 return (a_a > 0) ? a_a : -a_a;
62 template <
class T>
inline void Swap(T& a_a,
79 template <
unsigned int P>
80 constexpr
inline int ipow(
int M) {
return M*
ipow<P-1>(
M);}
82 constexpr
inline int ipow<0>(
int M) {
return 1;}
84 inline int ipow(
int a,
int b)
98 return std::pow(a, b);
118 if (a_i <= 0)
return false;
124 return (i >> 1) ? false :
true;
135 template <
typename T>
144 template <
typename C>
static One
test(
int C::*);
145 template <
typename C>
static Two test(...);
#define CH_assert(cond)
Definition: CHArray.H:37
bool isPower2(const int a_i)
Test if integer is a power of 2.
Definition: Misc.H:116
static One test(int C::*)
void const char const int const int const int const Real const Real const int const Real const int const Real Real * C
Definition: Lapack.H:83
double Real
Definition: REAL.H:33
T Abs(const T &a_a)
Definition: Misc.H:53
Test for class type.
Definition: Misc.H:136
T Min(const T &a_a, const T &a_b)
Definition: Misc.H:26
void const char const int * M
Definition: Lapack.H:83
T Max(const T &a_a, const T &a_b)
Definition: Misc.H:39
constexpr int ipow(int M)
Definition: Misc.H:80
char One
Definition: Misc.H:139
constexpr int ipow< 0 >(int M)
Definition: Misc.H:82
void Swap(T &a_a, T &a_b)
Definition: Misc.H:62