Documentation


animal::Numerics< Number > Class Template Reference

#include <numerics.h>

List of all members.


Detailed Description

template<class Number>
class animal::Numerics< Number >

Numerics general template.

Defines numerical functions and constants.

Create or derive your own version to adapt class Numerics to a given type.

Not necessarily optimized for any type. Check yourself. Specializations exist for types float and double.

Author:
David Bourguignon, February 2000, numerics.h 2002/01/10 Frank Perbet
iMAGIS/GRAVIR, 2000

Definition at line 50 of file numerics.h.

Public Types

typedef int Boolean
 Boolean value.

typedef double Real
 Value returned by the numeric functions.


Static Public Member Functions

Real PI ()
 PI.

Real CONV_RAD_TO_DEG ()
 conversion from radian to degree degree = radian * CONV_RAD_TO_DEG()

Real CONV_DEG_TO_RAD ()
 conversion from degree to radain radian = degree * CONV_RAD_TO_DEG

Real E ()
 E = exp(1).

Miscellaneous numerical functions
Number fpabs (Number k)
 Absolute value (floating point number).

Real sqroot (Number k)
 Square root.

Real sine (Number k)
 Sine.

Real asine (Number k)
 Arc Sine.

Real cosine (Number k)
 Cosine.

Real acosine (Number k)
 Arc Cosine.

Real tan (Number k)
 tan

Real atan (Number k)
 Arc tan.

Real e (Number k)
 Exponential.

Real ln (Number k)
 Logarithm.

Real power (Number k1, Number k2)
 Logarithm.

Real prev_integer (Number a)
 return the first real round value lower than a

Real next_integer (Number a)
 return the first real round value higher than a

Boolean isfinite (Number k)
 Always true.

Real numthreshold ()
 Numerical threshold: arbitrary set to zero.


Member Typedef Documentation

template<class Number>
typedef int animal::Numerics< Number >::Boolean
 

Boolean value.

Definition at line 56 of file numerics.h.

Referenced by animal::Numerics< Number >::isfinite().

template<class Number>
typedef double animal::Numerics< Number >::Real
 

Value returned by the numeric functions.

Definition at line 59 of file numerics.h.


Member Function Documentation

template<class Number>
Real animal::Numerics< Number >::acosine Number  k  )  [inline, static]
 

Arc Cosine.

Definition at line 103 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::asine Number  k  )  [inline, static]
 

Arc Sine.

Definition at line 97 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::atan Number  k  )  [inline, static]
 

Arc tan.

Definition at line 109 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::CONV_DEG_TO_RAD  )  [inline, static]
 

conversion from degree to radain radian = degree * CONV_RAD_TO_DEG

Definition at line 75 of file numerics.h.

References animal::Numerics< Number >::PI().

template<class Number>
Real animal::Numerics< Number >::CONV_RAD_TO_DEG  )  [inline, static]
 

conversion from radian to degree degree = radian * CONV_RAD_TO_DEG()

Definition at line 70 of file numerics.h.

References animal::Numerics< Number >::PI().

template<class Number>
Real animal::Numerics< Number >::cosine Number  k  )  [inline, static]
 

Cosine.

Definition at line 100 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::e Number  k  )  [inline, static]
 

Exponential.

Definition at line 112 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::E  )  [inline, static]
 

E = exp(1).

Definition at line 79 of file numerics.h.

template<class Number>
Number animal::Numerics< Number >::fpabs Number  k  )  [inline, static]
 

Absolute value (floating point number).

Definition at line 88 of file numerics.h.

template<class Number>
Boolean animal::Numerics< Number >::isfinite Number  k  )  [inline, static]
 

Always true.

Definition at line 127 of file numerics.h.

References animal::Numerics< Number >::Boolean.

template<class Number>
Real animal::Numerics< Number >::ln Number  k  )  [inline, static]
 

Logarithm.

Definition at line 115 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::next_integer Number  a  )  [inline, static]
 

return the first real round value higher than a

Definition at line 124 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::numthreshold  )  [inline, static]
 

Numerical threshold: arbitrary set to zero.

Definition at line 130 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::PI  )  [inline, static]
 

PI.

Definition at line 65 of file numerics.h.

Referenced by animal::Numerics< double >::CONV_DEG_TO_RAD(), animal::Numerics< float >::CONV_DEG_TO_RAD(), animal::Numerics< Number >::CONV_DEG_TO_RAD(), animal::Numerics< double >::CONV_RAD_TO_DEG(), animal::Numerics< float >::CONV_RAD_TO_DEG(), and animal::Numerics< Number >::CONV_RAD_TO_DEG().

template<class Number>
Real animal::Numerics< Number >::power Number  k1,
Number  k2
[inline, static]
 

Logarithm.

Definition at line 118 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::prev_integer Number  a  )  [inline, static]
 

return the first real round value lower than a

Definition at line 121 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::sine Number  k  )  [inline, static]
 

Sine.

Definition at line 94 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::sqroot Number  k  )  [inline, static]
 

Square root.

Definition at line 91 of file numerics.h.

template<class Number>
Real animal::Numerics< Number >::tan Number  k  )  [inline, static]
 

tan

Definition at line 106 of file numerics.h.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:52:30 2004 by doxygen 1.3.6