aimstil
5.0.5
|
Numerical precision of the data for storage classes. More...
#include <til/traits.h>
Numerical precision of the data for storage classes.
Stores the precision of the class, i.e. the format in which ultimately the data is stored. E.g. precision<ImageC<double> >::type is double. precision<std::complex<float> > is float, not complex<float>. This allows to check whether data types are compatible, independently of the object itself. Mainly for performance reasons. E.g. when multiplying a matrix image with a constant vector, this could be used to check that the precision of matrices in the image and the constant vector are the same, to avoid to do a cast for every multiplication. Note that this is completely different from Container::value_type, which merely gives the type of the containee without cascading down to the encoding type.