Public Types | List of all members
blaze::Accuracy Class Reference

Computation accuracy for floating point data types.The Accuracy class is a wrapper class around the functionality of the blaze::Limits class. It represents the computation accuracy of the Blaze library for any floating point data type. In order to assign an accuracy value, the Accuracy class can be implicitly converted to the three built-in floating point data types float, double and long double.
In order to handle accuracy values conveniently, the global Accuracy instance blaze::accuracy is provided, which can be used wherever a floating point data value is required. More...

#include <Accuracy.h>

Public Types

typedef NegativeAccuracy< AccuracyNegativeType
 The negated accuracy type.
 

Public Member Functions

Constructor
 Accuracy ()
 The default constructor of the Accuracy class.
 
Unary plus/minus operators
const Accuracyoperator+ () const
 Returns the positive computation accuracy for all floating point data types. More...
 
const NegativeType operator- () const
 Returns the negative computation accuracy for all floating point data types. More...
 
Conversion operator
template<typename T >
 operator const T () const
 Conversion operator to the required floating point data type. More...
 

Private Member Functions

Forbidden operations
Accuracyoperator= (const Accuracy &)
 Copy assignment operator (private & undefined)
 
void * operator& () const
 Address operator (private & undefined)
 

Detailed Description

Computation accuracy for floating point data types.

The Accuracy class is a wrapper class around the functionality of the blaze::Limits class. It represents the computation accuracy of the Blaze library for any floating point data type. In order to assign an accuracy value, the Accuracy class can be implicitly converted to the three built-in floating point data types float, double and long double.
In order to handle accuracy values conveniently, the global Accuracy instance blaze::accuracy is provided, which can be used wherever a floating point data value is required.

float f = accuracy; // Assigns the positive computation accuracy for single precision values
double d = -accuracy; // Assigns the negative computation accuracy for double precision values

Member Function Documentation

template<typename T >
blaze::Accuracy::operator const T ( ) const
inline

Conversion operator to the required floating point data type.

The conversion operator returns the computation accuracy for the floating point data type T.

const Accuracy & blaze::Accuracy::operator+ ( ) const
inline

Returns the positive computation accuracy for all floating point data types.

Returns
The positive computation accuracy.
const Accuracy::NegativeType blaze::Accuracy::operator- ( ) const
inline

Returns the negative computation accuracy for all floating point data types.

Returns
The negative computation accuracy.

The documentation for this class was generated from the following file: