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

Numeric functions. More...

#include <platform/types.hh>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <limits>

Classes

struct  numeric::NearestSelector< R, T, bool >
 Nearest function selector class for R non-integer or T integer. More...
struct  numeric::NearestSelector< R, T, true >
 Nearest function selector class for R integer and T non-integer. More...
struct  numeric::ModSelector< T, bool >
 Mod function selector class for non-integer types. More...
struct  numeric::ModSelector< T, true >
 Mod function selector class for integer types. More...
struct  numeric::ModuloSelector< T, bool >
 Modulo function selector class for non-integer types. More...
struct  numeric::ModuloSelector< T, true >
 Modulo function selector class for integer types. More...
struct  numeric::RemainderSelector< T, bool >
 Remainder function selector class for non-integer types. More...
struct  numeric::RemainderSelector< T, true >
 Remainder function selector class for integer types. More...
struct  numeric::FastRemainderSelector< T, bool >
 Fast remainder function selector class for non-integer types. More...
struct  numeric::FastRemainderSelector< T, true >
 Fast remainder function selector class for integer types. More...

Namespaces

namespace  numeric
 

A 1D histogram based upon a map structure.


Functions

short int numeric::min (short int const a, short int const b)
 min( short int, short int )
int numeric::min (int const a, int const b)
 min( int, int )
long int numeric::min (long int const a, long int const b)
 min( long int, long int )
unsigned short int numeric::min (unsigned short int const a, unsigned short int const b)
 min( unsigned short int, unsigned short int )
unsigned int numeric::min (unsigned int const a, unsigned int const b)
 min( unsigned int, unsigned int )
unsigned long int numeric::min (unsigned long int const a, unsigned long int const b)
 min( unsigned long int, unsigned long int )
float numeric::min (float const a, float const b)
 min( float, float )
double numeric::min (double const a, double const b)
 min( double, double )
long double numeric::min (long double const a, long double const b)
 min( long double, long double )
template<typename T >
T const & numeric::min (T const &a, T const &b, T const &c)
 min( a, b, c )
template<typename T >
T const & numeric::min (T const &a, T const &b, T const &c, T const &d)
 min( a, b, c, d )
template<typename T >
T const & numeric::min (T const &a, T const &b, T const &c, T const &d, T const &e)
 min( a, b, c, d, e )
template<typename T >
T const & numeric::min (T const &a, T const &b, T const &c, T const &d, T const &e, T const &f)
 min( a, b, c, d, e, f )
short int numeric::max (short int const a, short int const b)
 max( short int, short int )
int numeric::max (int const a, int const b)
 max( int, int )
long int numeric::max (long int const a, long int const b)
 max( long int, long int )
unsigned short int numeric::max (unsigned short int const a, unsigned short int const b)
 max( unsigned short int, unsigned short int )
unsigned int numeric::max (unsigned int const a, unsigned int const b)
 max( unsigned int, unsigned int )
unsigned long int numeric::max (unsigned long int const a, unsigned long int const b)
 max( unsigned long int, unsigned long int )
float numeric::max (float const a, float const b)
 max( float, float )
double numeric::max (double const a, double const b)
 max( double, double )
long double numeric::max (long double const a, long double const b)
 max( long double, long double )
template<typename T >
T const & numeric::max (T const &a, T const &b, T const &c)
 max( a, b, c )
template<typename T >
T const & numeric::max (T const &a, T const &b, T const &c, T const &d)
 max( a, b, c, d )
template<typename T >
T const & numeric::max (T const &a, T const &b, T const &c, T const &d, T const &e)
 max( a, b, c, d, e )
template<typename T >
T const & numeric::max (T const &a, T const &b, T const &c, T const &d, T const &e, T const &f)
 max( a, b, c, d, e, f )
template<typename T >
numeric::square (T const &x)
 square( x ) == x^2
template<typename T >
numeric::cube (T const &x)
 cube( x ) == x^3
template<typename T >
int numeric::sign (T const &x)
 sign( x )
template<typename S , typename T >
numeric::sign_transfered (S const &sigma, T const &x)
 Sign transfered value.
template<typename T >
numeric::abs_difference (T const &a, T const &b)
 Absolute difference.
template<typename R , typename T >
numeric::nearest (T const &x)
 nearest< R >( x ): Nearest R
template<typename T >
std::size_t numeric::nearest_size (T const &x)
 nearest_size( x ): Nearest std::size_t
template<typename T >
ssize_t numeric::nearest_ssize (T const &x)
 nearest_ssize( x ): Nearest ssize_t
template<typename T >
int numeric::nearest_int (T const &x)
 nearest_int( x ): Nearest int
template<typename T >
int numeric::nint (T const &x)
 nint( x ): Nearest int
template<typename T >
numeric::mod (T const &x, T const &y)
 x(mod y) computational modulo returning magnitude < | y | and sign of x
template<typename T >
numeric::modulo (T const &x, T const &y)
 x(mod y) mathematical modulo returning magnitude < | y | and sign of y
template<typename T >
numeric::remainder (T const &x, T const &y)
 Remainder of x with respect to division by y that is of smallest magnitude.
template<typename T >
numeric::fast_remainder (T const &x, T const &y)
 Remainder of x with respect to division by y that is of smallest magnitude.
template<typename T , typename S >
numeric::remainder_conversion (T const &t, S &s)
 Remainder and result of conversion to a different type.
template<typename T >
numeric::gcd (T const &m, T const &n)
 Greatest common divisor.
template<typename T >
bool numeric::eq_tol (T const &x, T const &y, T const &r_tol, T const &a_tol)
 Equal within specified relative and absolute tolerances?
template<typename T >
bool numeric::lt_tol (T const &x, T const &y, T const &r_tol, T const &a_tol)
 Less than within specified relative and absolute tolerances?
template<typename T >
bool numeric::le_tol (T const &x, T const &y, T const &r_tol, T const &a_tol)
 Less than or equal within specified relative and absolute tolerances?
template<typename T >
bool numeric::ge_tol (T const &x, T const &y, T const &r_tol, T const &a_tol)
 Greater than or equal within specified relative and absolute tolerances?
template<typename T >
bool numeric::gt_tol (T const &x, T const &y, T const &r_tol, T const &a_tol)
 Greater than within specified relative and absolute tolerances?
bool numeric::is_a_finitenumber (double s, double a, double b)

Detailed Description

Numeric functions.

Author:
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines