|
latest version v1.9 - last update 24 Nov 2005 |
|
#include <ltiTypeInfo.h>
Inheritance diagram for lti::typeInfo< T >:


Public Types | |
| typedef T | accumulation_type |
| typedef T | square_accumulation_type |
Static Public Member Functions | |
| static T | suggestedNorm () throw () |
| static bool | isFloatingPointType () throw () |
| static const char * | name () throw () |
| static T | min () throw () |
Note that the members are static, and you do not need any instance of the class to get the type information.
For more information about a type you can also use the std::numeric_limits type of the Standard Template Library.
Example:
if (typeInfo<double>::isFloatingPointType()) { cout << "double is a floating point type" << endl; } else { cout << "this is a really weird case!" << endl; }
|
|||||
|
Type suggested for accumulation of current type elements (for example int for ubyte).
|
|
|||||
|
Type suggested to accumulate the square of values of the current type.
|
|
|||||||||
|
return true if the type T is a floating point type.
|
|
|||||||||
|
The difference of this minimum with the std::numeric_limits<T>::min() is that here the minimum value is returned for floating point types and fixed point types. The STL method returns for floating point values the minimal representable value above zero. For max() you can use the standard version |
|
|||||||||
|
Return a const char* with the name of the type.
|
|
|||||||||
|
suggest a norm for the given type. Usually 255 is used for ubyte, 127 for byte, 65535 for all other integer types and 1.0 for the floating point types. |