IMP logo

utility.h File Reference

Functions to deal with very common math operations. More...

Include dependency graph for algebra/utility.h:

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

Go to the source code of this file.


Namespaces

namespace  IMP
 The IMP kernel provides base classes and key shared functionality.
namespace  IMP::algebra
 This module contains general purpose algebraic and geometric methods.

Functions

bool IMP::algebra::get_are_almost_equal (const double a, const double b, const double epsilon)
 Compares two values (intended for doubles).
template<typename T >
IMP::algebra::get_constrained (const T x, const T x0, const T xF)
 Constrains a value between two given limits.
double IMP::algebra::get_next_larger_power_of_2 (double x)
 Closest power of 2 that can contain a number x.
float IMP::algebra::get_next_larger_power_of_2 (float x)
 Closest power of 2 that can contain a number x.
template<typename T >
int IMP::algebra::get_rounded (const T &x)
 Rounds a number to next integer.
template<typename T >
int IMP::algebra::get_sign (const T &x)
 Sign of a number. 1 if the number is higher or equal to 0 and -1 otherwise.
bool IMP::algebra::xorT (bool x, bool y)
 xor operation between two values

Detailed Description

Functions to deal with very common math operations.

Author:
Javier Velazquez-Muriel Copyright 2007-2010 IMP Inventors. All rights reserved.

Generated on Mon Mar 8 23:08:14 2010 for IMP by doxygen 1.5.8