Rosetta 3.3
Namespaces | Functions
src/numeric/util.hh File Reference

small bundle of utilities for dealing with numbers. More...

#include <numeric/types.hh>
#include <utility/vector1.hh>
#include <limits>
#include <cmath>
#include <algorithm>

Namespaces

namespace  numeric
 

A 1D histogram based upon a map structure.


Functions

double numeric::log (double x, double base)
 Computes log(x) in the given base.
template<typename T >
bool numeric::isnan (T value)
 portable check to see if a value is NaN.
template<typename T >
bool numeric::isinf (T value)
bool numeric::equal_by_epsilon (numeric::Real value1, numeric::Real value2, numeric::Real epsilon)
 are two Real values are equal up to some epsilon
numeric::Real numeric::median (utility::vector1< numeric::Real > const &values)
 Returns the median from a vector1 of Real values.
numeric::Real numeric::mean (utility::vector1< numeric::Real > const &values)
Real numeric::boltzmann_accept_probability (Real const score_before, Real const score_after, Real const temperature)
 Calculates the acceptance probability of a given score-change at the given temperature, generally used in simulated annealing algorithms. Returns a value in the range (0-1).

Detailed Description

small bundle of utilities for dealing with numbers.

Author:
James Thompson
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines