# plr

## Data Structures

class  RobProb::plr
Represents the normal-domain probabilities of the two outcomes of a single binary event as a ratio. More...

## Functions

RobProb::plr::plr (void)
Default constructor.
RobProb::plr::plr (double x)
Constructor allowing implicit conversion from the double data type.
bool RobProb::plr::plus_infinity (void) const
Determines if the normal-domain probability ratio is equal to plus infinity.
void RobProb::plr::set_to_plus_infinity (void)
Sets the normal-domain probability ratio to plus infinity.
plr RobProb::plr::operator+ (const plr &rhs) const
Addition operator.
plr & RobProb::plr::operator+= (const plr &rhs)
Addition assignment operator.
plr RobProb::plr::operator- (const plr &rhs) const
Subtraction operator.
plr & RobProb::plr::operator-= (const plr &rhs)
Subtraction assignment operator.
plr RobProb::plr::operator * (const plr &rhs) const
Multiplication operator.
plr & RobProb::plr::operator *= (const plr &rhs)
Multiplication assignment operator.
plr RobProb::plr::operator/ (const plr &rhs) const
Division operator.
plr & RobProb::plr::operator/= (const plr &rhs)
Division assignment operator.
bool RobProb::plr::operator== (const plr &rhs) const
Test for equality operator.
bool RobProb::plr::operator!= (const plr &rhs) const
Test for non-equality operator.
bool RobProb::plr::operator> (const plr &rhs) const
Test for greater than operator.
bool RobProb::plr::operator< (const plr &rhs) const
Test for less than operator.
bool RobProb::plr::operator>= (const plr &rhs) const
Test for greater than or equal to operator.
bool RobProb::plr::operator<= (const plr &rhs) const
Test for less than or equal to operator.
plr RobProb::to_plr (double x, double temp_infinity=infinity)
Conversion from the double data type.
double RobProb::to_double (const plr &x, double temp_infinity=infinity)
Conversion to the double data type.
pvalues RobProb::to_pvalues (const plr &x)
Conversion to the pvalues data type.
bin RobProb::hard (const plr &x)
Hard decision.
llr RobProb::log (const plr &x)
Logarithm, allowing conversion to the llr data type.
plr RobProb::add (const plr &lhs, const plr &rhs, JacobianType temp_jacobian_type=jacobian_type)
Adds two normal-domain probability ratios, allowing the specification of how to correct the Jacobian approximation.
istream & RobProb::operator>> (istream &in, plr &rhs)
Input operator.
ostream & RobProb::operator<< (ostream &out, const plr &rhs)
Output operator.
double RobProb::entropy (const plr &x)
Calculates the entropy associated with a normal-domain probability ratio.
double RobProb::mutual_information (const plr &x, const plr &source_plr)
Calculates the mutual information associated with a normal-domain probability ratio for a non-equiprobable source.
double RobProb::mutual_information (const plr &x)
Calculates the mutual information associated with a normal-domain probability ratio for an equiprobable source.
plr RobProb::generate_gaussian_plr (bin bit, double mutual_information)
Generates a Gaussian-distributed normal-domain probability ratio with a given mutual information for a bit from an equiprobable source.
plr RobProb::generate_bec_plr (bin bit, double mutual_information)
Generates a BEC-distributed normal-domain probability ratio with a given mutual information for a bit from an equiprobable source.

## Function Documentation

 RobProb::plr::plr ( void )  [inherited]

Default constructor.

The plr variable is set to a normal-domain probability ratio of unity.

 RobProb::plr::plr ( double x )  [inherited]

Constructor allowing implicit conversion from the double data type.

Parameters:
 x The normal-domain probability ratio that the plr variable is set to. This must be greater than or equal to zero.

 bool RobProb::plr::plus_infinity ( void ) const [inherited]

Determines if the normal-domain probability ratio is equal to plus infinity.

Returns:
The result of the test.

 void RobProb::plr::set_to_plus_infinity ( void )  [inherited]

Sets the normal-domain probability ratio to plus infinity.

 plr RobProb::plr::operator+ ( const plr & rhs ) const [inherited]

Addition operator.

Note that behind the scenes, addition in the normal-domain is achieved by applying the Jacobian operator in the logarithmic-domain. For this reason, the value of the global variable jacobian_type is used to specify how to correct the Jacobian approximation. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the addition.

 plr& RobProb::plr::operator+= ( const plr & rhs )  [inherited]

Addition assignment operator.

Note that behind the scenes, addition in the normal-domain is achieved by applying the Jacobian operator in the logarithmic-domain. For this reason, the value of the global variable jacobian_type is used to specify how to correct the Jacobian approximation. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The plr variable itself, which now stores the result of the addition.

 plr RobProb::plr::operator- ( const plr & rhs ) const [inherited]

Subtraction operator.

Note that behind the scenes, subtraction in the normal-domain is achieved by applying the Jacobian operator in the logarithmic-domain. In this case, the Jacobian approximation is always corrected. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 rhs The right-hand-side normal-domain probability ratio. This must have a value which is less than or equal to the left-hand-side operand.
Returns:
The result of the subtraction.

 plr& RobProb::plr::operator-= ( const plr & rhs )  [inherited]

Subtraction assignment operator.

Note that behind the scenes, subtraction in the normal-domain is achieved by applying the Jacobian operator in the logarithmic-domain. In this case, the Jacobian approximation is always corrected. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 rhs The right-hand-side normal-domain probability ratio. This must have a value which is less than or equal to the left-hand-side operand.
Returns:
The plr variable itself, which now stores the result of the subtraction.

 plr RobProb::plr::operator * ( const plr & rhs ) const [inherited]

Multiplication operator.

Note that behind the scenes, multiplication in the normal-domain is achieved by addition in the logarithmic-domain. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the multiplication.

 plr& RobProb::plr::operator *= ( const plr & rhs )  [inherited]

Multiplication assignment operator.

Note that behind the scenes, multiplication in the normal-domain is achieved by addition in the logarithmic-domain. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The plr variable itself, which now stores the result of the mutliplication.

 plr RobProb::plr::operator/ ( const plr & rhs ) const [inherited]

Division operator.

Note that behind the scenes, division in the normal-domain is achieved by subtraction in the logarithmic-domain. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the division.

 plr& RobProb::plr::operator/= ( const plr & rhs )  [inherited]

Division assignment operator.

Note that behind the scenes, division in the normal-domain is achieved by subtraction in the logarithmic-domain. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The pvalue variable itself, which now stores the result of the division.

 bool RobProb::plr::operator== ( const plr & rhs ) const [inherited]

Test for equality operator.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the test.

 bool RobProb::plr::operator!= ( const plr & rhs ) const [inherited]

Test for non-equality operator.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the test.

 bool RobProb::plr::operator> ( const plr & rhs ) const [inherited]

Test for greater than operator.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the test.

 bool RobProb::plr::operator< ( const plr & rhs ) const [inherited]

Test for less than operator.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the test.

 bool RobProb::plr::operator>= ( const plr & rhs ) const [inherited]

Test for greater than or equal to operator.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the test.

 bool RobProb::plr::operator<= ( const plr & rhs ) const [inherited]

Test for less than or equal to operator.

Parameters:
 rhs The right-hand-side normal-domain probability ratio.
Returns:
The result of the test.

 plr RobProb::to_plr ( double x, double temp_infinity = infinity )

Conversion from the double data type.

Parameters:
 x The normal-domain probability ratio that the new plr variable is set to. This must be greater than or equal to zero. temp_infinity Specifies the absolute value used to represent infinity when converting from the double type. If a value of 0.0 is specified, no clipping is employed. If not provided, the value of the global variable infinity is used by default.
Returns:
The new plr variable.

 double RobProb::to_double ( const plr & x, double temp_infinity = infinity )

Conversion to the double data type.

Parameters:
 x The plr variable. temp_infinity Specifies the absolute value used to represent infinity when converting to the double type. If a value of 0.0 is specified, no clipping is employed. In this case, an error is generated in the event of converting a positive or negative infinite value to the double data type. If not provided, the value of the global variable infinity is used by default.
Returns:
The normal-domain probability ratio of the plr variable.

 pvalues RobProb::to_pvalues ( const plr & x )

Conversion to the pvalues data type.

Parameters:
 x The normal-domain probability ratio.
Returns:
A two-entry normal-domain probabilities array, providing the unnormalized probabilties of the zero- and unity-valued event outcomes.

 bin RobProb::hard ( const plr & x )

Hard decision.

Parameters:
 x The normal-domain probability ratio.
Returns:
The index of the most likely outcome of the single binary event.

 llr RobProb::log ( const plr & x )

Logarithm, allowing conversion to the llr data type.

Note that behind the scenes, this conversion is achieved by a change of interface rather than a calculation.

Parameters:
 x The normal-domain probability ratio.
Returns:
, where is the normal-domain probability ratio.

 plr RobProb::add ( const plr & lhs, const plr & rhs, JacobianType temp_jacobian_type = jacobian_type )

Adds two normal-domain probability ratios, allowing the specification of how to correct the Jacobian approximation.

This is required because, behind the scenes, addition in the normal-domain is achieved by applying the Jacobian operator in the logarithmic-domain. Also note that behind the scenes, normal-domain probability ratios of plus infinity are handled as a special case.

Parameters:
 lhs The left-hand-side normal-domain probability ratio. rhs The right-hand-side normal-domain probability ratio. temp_jacobian_type Specifies how to correct the Jacobian approximation. If not provided, the value of the global variable jacobian_type is used by default.
Returns:
The result of the addition.

 istream & RobProb::operator>> ( istream & in, plr & rhs )

Input operator.

Parameters:
 in The input stream containing the normal-domain probability ratio that the right-hand-side operand is set to. This must be greater than or equal to zero. rhs The right-hand-side normal-domain probability ratio.
Returns:
The input stream itself.

 ostream & RobProb::operator<< ( ostream & out, const plr & rhs )

Output operator.

Parameters:
 out The output stream to which the normal-domain probability ratio of the right-hand-side operand is written. rhs The right-hand-side normal-domain probability ratio.
Returns:
The output stream itself.

 double RobProb::entropy ( const plr & x )

Calculates the entropy associated with a normal-domain probability ratio.

Preforms a conversion to the pvalues data type and calls the associated entropy function.

Parameters:
 x The normal-domain probability ratio.
Returns:
The result of the calculation.

 double RobProb::mutual_information ( const plr & x, const plr & source_plr )

Calculates the mutual information associated with a normal-domain probability ratio for a non-equiprobable source.

Note that truely APP decoders should be used to obtain accurate mutual information measurements.

Parameters:
 x The normal-domain probability ratio. source_plr The normal-domain source probability ratio.
Returns:
, where is the entropy of the normal-domain source probability ratio and is the entropy of the normal-domain probability ratio.

 double RobProb::mutual_information ( const plr & x )

Calculates the mutual information associated with a normal-domain probability ratio for an equiprobable source.

Note that truely APP decoders should be used to obtain accurate mutual information measurements.

Parameters:
 x The normal-domain probability ratio.
Returns:
, where is the entropy of the normal-domain probability ratio.

 plr RobProb::generate_gaussian_plr ( bin bit, double mutual_information )

Generates a Gaussian-distributed normal-domain probability ratio with a given mutual information for a bit from an equiprobable source.

Parameters:
 bit The bit. mutual_information The mutual information.
Returns:
The generated normal-domain probability ratio.

 plr RobProb::generate_bec_plr ( bin bit, double mutual_information )

Generates a BEC-distributed normal-domain probability ratio with a given mutual information for a bit from an equiprobable source.

Parameters:
 bit The bit. mutual_information The mutual information.
Returns:
The generated normal-domain probability ratio.

Generated on Mon Sep 1 14:41:39 2008 for RobProb by  1.5.3