/Users/brown170/Projects/Current/coral_msu_repo/trunk/src/coralutils/utils.h File Reference

#include <string>

Include dependency graph for utils.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define IS_ODD(n)   ((n) & 1)
#define IS_EVEN(n)   (!(IS_ODD(n)))
#define NEGONE_TO_THE(n)   (IS_ODD(n) ? -1 : 1)
#define SIGN(x)   ((x) >= 0.0 ? 1 : -1)
#define MAXF(x, y)   maxof<double>(x,y)
#define MINF(x, y)   minof<double>(x,y)
#define MAXI(x, y)   maxof<int>(x,y)
#define MINI(x, y)   minof<int>(x,y)

Functions

template<class T >
int iround (T x)
template<class T >
sign (T x)
template<class T >
minof (T x1, T x2)
template<class T >
maxof (T x1, T x2)
bool file_exists (const char *file_name)
bool file_exists (const std::string &file_name)
double mod (double x, double y)


Define Documentation

#define IS_EVEN (  )     (!(IS_ODD(n)))

Definition at line 11 of file utils.h.

#define IS_ODD (  )     ((n) & 1)

Definition at line 10 of file utils.h.

#define MAXF ( x,
 )     maxof<double>(x,y)

Definition at line 14 of file utils.h.

#define MAXI ( x,
 )     maxof<int>(x,y)

Definition at line 16 of file utils.h.

#define MINF ( x,
 )     minof<double>(x,y)

Definition at line 15 of file utils.h.

#define MINI ( x,
 )     minof<int>(x,y)

Definition at line 17 of file utils.h.

#define NEGONE_TO_THE (  )     (IS_ODD(n) ? -1 : 1)

Definition at line 12 of file utils.h.

#define SIGN (  )     ((x) >= 0.0 ? 1 : -1)

Definition at line 13 of file utils.h.


Function Documentation

bool file_exists ( const std::string &  file_name  ) 

Definition at line 17 of file utils.cc.

bool file_exists ( const char *  file_name  ) 

Definition at line 7 of file utils.cc.

template<class T >
int iround ( x  )  [inline]

Definition at line 24 of file utils.h.

template<class T >
T maxof ( x1,
x2 
) [inline]

Definition at line 47 of file utils.h.

template<class T >
T minof ( x1,
x2 
) [inline]

Definition at line 41 of file utils.h.

double mod ( double  x,
double  y 
)

Definition at line 21 of file utils.cc.

template<class T >
T sign ( x  )  [inline]

Definition at line 35 of file utils.h.


Generated on Fri Feb 6 13:30:17 2009 for CorAL by  doxygen 1.5.8