5#ifndef TRTCONDITIONSDATA_LINEARPACKER_H
6#define TRTCONDITIONSDATA_LINEARPACKER_H
15 template <
class UnpackedType,
class PackedType>
30 PackedType
pack(UnpackedType
x )
const {
37 PackedType
valmax()
const {
return std::numeric_limits<PackedType>::max() ; }
40 PackedType
valmin()
const {
return std::numeric_limits<PackedType>::min() ; }
LinearPacker()
default constructor
UnpackedType m_xmin
minimum data value
UnpackedType m_xmax
maximum data value
PackedType pack(UnpackedType x) const
Pack method.
PackedType valmin() const
returns numeric lower limit of packed type
UnpackedType unpack(PackedType val) const
Unpack method.
PackedType valmax() const
returns numeric upper limit of packed type
UnpackedType dx() const
returns precision of the packed data
LinearPacker(UnpackedType xmin, UnpackedType xmax)
normal constructor