STK++ 1.0
STK_Misc.h File Reference

In this file we define miscellaneous utility (templated) functions. More...

#include <cmath>
#include <cstdlib>
#include "STK_String.h"
#include "STK_Integer.h"
#include "STK_Real.h"
#include "STK_Stream.h"
#include "STK_Proxy.h"
Include dependency graph for STK_Misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  STK
 

STK means the Statistical ToolKit.


Functions

template<class TYPE >
TYPE STK::sign (TYPE const &x, TYPE const &y=1)
 templated sign value sign(x) * y: TYPE should be Integer , long, float or Real
template<class TYPE >
void STK::swap (TYPE &x, TYPE &y)
 templated swap method.
template<class TYPE >
TYPE const & STK::min (TYPE const &x, TYPE const &y)
 templated minimum for class having defined <.
template<class TYPE >
TYPE const & STK::max (TYPE const &x, TYPE const &y)
 templated maximum for class having defined <.
template<class TYPE >
TYPE STK::abs (TYPE const &x)
 templated absolute value: TYPE should be Integer , long, float or Real.
Real STK::frand ()
 frand() generate a Real uniform number.
bool STK::isOdd (Integer const &x)
 is x a odd number ?
bool STK::isEven (Integer const &x)
 is x an even number ?
Integer STK::round (Real const &x)
 Computation of round off : return an Integer value.
Real STK::norm (Real const &x, Real const &y)
 Computation of sqrt(x^2 + y^2) without underflow or overflow.

Detailed Description

In this file we define miscellaneous utility (templated) functions.

Definition in file STK_Misc.h.