util.h File Reference

Collects a variety of constants and function in namespace Util. More...

#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <vector>

Include dependency graph for util.h:

Go to the source code of this file.

Namespaces

namespace  Util

Classes

class  Util::PrintForVector< T >

Defines

#define __UTIL_H

Functions

template<class C>
Util::vectorMin (std::vector< C > &v)
template<class C>
Util::vectorMax (std::vector< C > &v)
double Util::round (double x)
double Util::safeLog (double x)
double Util::sqr (double x)
template<class C>
void Util::FlushVector (std::vector< C > &v)
template<class Except, class Assertion>
void Util::Assert (Assertion assert)
template<class To, class From>
std::vector< To > Util::vector_cast (std::vector< From > &x)
template<class T>
std::ostream & operator<< (std::ostream &os, std::vector< T > x)

Variables

const double Util::dbl_eps = std::numeric_limits<double>::epsilon()
 minimum representable value of 1.0 - x
const double Util::dbl_max = std::numeric_limits<double>::max()
 maximum value of double
const double Util::dbl_min = std::numeric_limits<double>::min()
 minimum (positive) value of double
const int Util::int_max = std::numeric_limits<int>::max()
 maximum value of integer
const int Util::int_min = std::numeric_limits<int>::min()
 minimum value of integer
const unsigned Util::uint_max = std::numeric_limits<unsigned>::max()
 maximum value of unsigned integer
const long Util::long_max = std::numeric_limits<long>::max()
 maximum value of long integer
const long Util::long_min = std::numeric_limits<long>::min()
 minimum value of long integer
const unsigned long Util::ulong_max = std::numeric_limits<unsigned long>::max()
 maximum value of unsigned long integer
const double Util::log_dbl_max = log(dbl_max)
 log(dbl_max)
const double Util::log_dbl_min = log(dbl_min)
 log(dbl_min)


Detailed Description

Collects a variety of constants and function in namespace Util.

Provides definitions for a variety of numerical constants related to double precision and integer arithmetic and for a small collection of utility functions.

All are declared in namespace Util with an eye towards avoiding naming conflicts.

Author:
Kent Holsinger
Date:
2004-06-26

Definition in file util.h.


Function Documentation

template<class T>
std::ostream& operator<< ( std::ostream &  os,
std::vector< T >  x 
)

ostream& operator<< for vectors

Parameters:
os the ostream
x the vector

Definition at line 172 of file util.h.


Generated on Tue Mar 27 16:03:47 2007 for mcmc by  doxygen 1.5.1