Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

plProbability Class Reference

This class implements specialized new arithmetics for probabilities. More...

#include <plProbability32.h>

Collaboration diagram for plProbability:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 plProbability ()
 The default void constructor.
 plProbability (const long double &f)
 The conversion constructor from a "long double".
 plProbability (const double &f)
 The conversion constructor from a "double".
 plProbability (const float &f)
 The conversion constructor from a "float".
 plProbability (const int &i)
 The conversion constructor from a "int".
 plProbability (const unsigned int &i)
 The conversion constructor from a "unsigned int".
 plProbability (unsigned long f, long e)
 The constructor using the "f" and "e" values.
 operator float () const
 Conversion to "float" operator.
 operator double () const
 Conversion to "double" operator.
 operator long double () const
 Conversion to "long double" operator.
plProbability operator+ (const plProbability &pc) const
 The "+" operator.
plProbability operator- (const plProbability &pc) const
 The "-" operator.
plProbabilityoperator+= (const plProbability &pc)
 The "+=" operator.
plProbabilityoperator-= (const plProbability &pc)
 The "-=" operator.
plProbability operator * (const plProbability &pc) const
 The "*" operator.
plProbabilityoperator *= (const plProbability &pc)
 The "*=" operator.
plProbability operator/ (const plProbability &pc) const
 The "/" operator.
plProbabilityoperator/= (const plProbability &pc)
 The "/=" operator.
bool operator== (const plProbability &p) const
 Comparison operators.
bool isNaN () const
 Returns "true" is the value is "NaN" and "false" otherwise.
bool isInfinity () const
 Returns "true" is the value is "Infinity" and "false" otherwise.

Friends

double log2 (const plProbability &pr)
 Base 2 logarithm function.
double log (const plProbability &pr)
 Natural logarithm function.
double log10 (const plProbability &pr)
 Base 10 logarithm function.
plProbability ppow (const plProbability &pr, long exp)
 The ppow() function returns the value of pr raised to the power of exp.
std::ostream & operator<< (std::ostream &out, const plProbability &p)
 Streaming operators "<<".

Detailed Description

This class implements specialized new arithmetics for probabilities.

Definition at line 63 of file plProbability32.h.


Constructor & Destructor Documentation

plProbability::plProbability unsigned long  f,
long  e
[inline]
 

The constructor using the "f" and "e" values.

Internal constructor. Never use it!!!

Definition at line 510 of file plProbability32.h.


Friends And Related Function Documentation

plProbability ppow const plProbability pr,
long  exp
[friend]
 

The ppow() function returns the value of pr raised to the power of exp.

Mantiss calculus - new mantiss : interm.f

Exponent calculus

Tests of calcul validity on long

< assert that pr_aux.e - PL_F_SIZE >= LONG_MIN

< assert that ( pr_aux.e - PL_F_SIZE )*exp <= LONG_MAX

< assert that LONG_MIN <= ( pr_aux.e - PL_F_SIZE )*exp

assert that interm.e + ( pr_aux.e - PL_F_SIZE )*exp <= LONG_MAX

assert that LONG_MIN <= interm.e + ( pr_aux.e - PL_F_SIZE )*exp

Definition at line 1247 of file plProbability32.h.


The documentation for this class was generated from the following file:
Generated on Fri Apr 1 10:59:33 2005 for ProBT by  doxygen 1.4.1