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

atlas::intutils Namespace Reference


Functions

template<typename I>
abs (I)
template<typename I>
divide (I, I)
template<typename I>
factorial (I)


Function Documentation

template<typename I>
I atlas::intutils::abs a  ) 
 

Synopsis: returns the absolute value of a

Definition at line 27 of file intutils_def.h.

Referenced by atlas::matrix::Matrix< C >::absMinPos().

template<typename I>
I atlas::intutils::divide a,
b
 

The result of divide(a,b) is the unique element q such that a = q.b + r, with 0 <= r < b. Here b is assumed to be > 0, the sign of a may be arbitrary. For instance, divide(-1,2) should be -1, so that -1 = -1.2 + 1. On my machine, -1/2 is 0 (which is the other value accepted by the C standard.) [Note that the correct symmetry to apply to |a|, one that maps classes with the same quotient to each other, is not $a\to -a$ but $a\to -1-a$, where the latter value can be conveniently written as |~a| in C or C++. Amazingly Fokko's incorrect original expresion |-(-a/b -1)| never did any harm. MvL]

Definition at line 48 of file intutils_def.h.

Referenced by atlas::smithnormal::columnReduce(), atlas::matrix::columnReduce(), atlas::smithnormal::rowReduce(), and atlas::matrix::rowReduce().

template<typename I>
I atlas::intutils::factorial a  ) 
 

Synopsis: returns the factorial of a. It is assumed that a >= 0; we do not worry about overflow.

Definition at line 53 of file intutils_def.h.


Generated on Wed Mar 26 16:52:50 2008 for atlas by  doxygen 1.3.9.1