Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

AUtils Class Reference

provides some generic functions for non-standard arithmetic operations

#include <AUtils.h>

List of all members.

Static Public Member Functions

template<class T> T max (T a, T b)
template<class T> T min (T a, T b)
template<class T> T div_roundup (T a, T b)
template<class T> T bminus (T a, T b)
template<class T, T top> T bplus (T a, T b)
template<class T> T bplus (T a, T b, T top)
template<class T, class CTYPE> T modsum (T *s, CTYPE n, T m)
template<class IT, class FT> IT roundup (FT x)
template<class T> T log2_ceil (T n)


Member Function Documentation

template<class T>
T AUtils::bminus a,
b
[static]
 

substraction with the modification to return 0 (T()) for negative difference (needs >, -, T())

template<class T>
T AUtils::bplus a,
b,
top
[static]
 

template<class T, T top>
T AUtils::bplus a,
b
[static]
 

addition with the modification to return top for sums that are larger than top

template<class T>
T AUtils::div_roundup a,
b
[static]
 

returns a divided through b rounded up to nearest "integer" (needs =, --, +, /)

template<class T>
T AUtils::log2_ceil n  )  [static]
 

compute 2-logarithm of n (rounded up to nearest int), i.e. number of bits needed to store values from {0,...,n-1}

template<class T>
T AUtils::max a,
b
[static]
 

return the maximum of a and b (needs >)

template<class T>
T AUtils::min a,
b
[static]
 

return the minimum of a and b (needs <)

template<class T, class CTYPE>
T AUtils::modsum T *  s,
CTYPE  n,
m
[static]
 

calculate the sum s[0]+...s[n-1] modulo m (needs =, +, for T and =, CTYPE(), <, ++ for CTYPE)

template<class IT, class FT>
IT AUtils::roundup FT  x  )  [static]
 

round up x to nearest integer


The documentation for this class was generated from the following file:
Generated on Thu Nov 13 23:44:22 2003 for steghide by doxygen 1.3.3