Structure for defining quantity.
More...
#include <Quantity.h>
|
|
typedef std::map< char, EncodingODIM > | map_t |
| | Container for default encodings.
|
| |
|
typedef std::list< EncodingODIM > | list_t |
| | List type applicable in constructors.
|
| |
|
| | Quantity (const std::string &name="", const QuantitySelector &compatibleVariants={}, const drain::Range< double > &range={}, char defaultType='\0', const list_t &l={}, double undetectValue=std::numeric_limits< double >::signaling_NaN()) |
| | Default constructor.
|
| |
|
| Quantity (const std::string &name, const QuantitySelector &compatibleVariants, char defaultType, const list_t &l={}, double undetectValue=std::numeric_limits< double >::signaling_NaN()) |
| | Constructor without range (counters can be such)
|
| |
|
| Quantity (const Quantity &quantity) |
| | Copy constructor.
|
| |
|
EncodingODIM & | set (char typecode) |
| | Declare encoding (a storage type and scaling) for this quantity.
|
| |
|
void | addEncodings (const list_t &l) |
| |
|
const EncodingODIM & | get (char typecode='\0') const |
| | Retrieve the scaling for a given storage type.
|
| |
|
const EncodingODIM & | get (const std::string &t) const |
| | Retrieve the scaling for a given storage type.
|
| |
|
bool | isApplicable (const std::string &key) |
| |
|
bool | hasUndetectValue () const |
| | True, if a value corresponding a very small (unmeasurable) value has been defined.
|
| |
| void | setZero (double value) |
| | Set a value to be used like a real measurement, for example in interpolation.
|
| |
| void | setZero (const std::string &value) |
| | Set a value to be used like a real measurement, for example in interpolation.
|
| |
|
void | unsetZero () |
| | Confirm that no value should be used as a substitute of undetected value.
|
| |
| void | setPhysicalRange (double min, double max=std::numeric_limits< double >::max()) |
| | Sets absolute or typical range of this quantity.
|
| |
|
std::ostream & | toStream (std::ostream &ostr) const |
| | Print declared encodings (storage types and scalings)
|
| |
|
|
std::string | name |
| | Container supporting constructors.
|
| |
|
QuantitySelector | keySelector |
| | Collection of quantities that can be similarly scaled and encoded.
|
| |
|
char | defaultType = '\0' |
| | Default storage type.
|
| |
|
drain::Range< double > | physicalRange |
| |
|
double | undetectValue = std::numeric_limits<double>::signaling_NaN() |
| | A physical value corresponding a very small (unmeasurable) value has been defined.
|
| |
Structure for defining quantity.
◆ Quantity()
| Quantity |
( |
const std::string & |
name = "", |
|
|
const QuantitySelector & |
compatibleVariants = {}, |
|
|
const drain::Range< double > & |
range = {}, |
|
|
char |
defaultType = '\0', |
|
|
const list_t & |
l = {}, |
|
|
double |
undetectValue = std::numeric_limits<double>::signaling_NaN() |
|
) |
| |
Default constructor.
Constructor accepting variants (related/similar quantities)
◆ setPhysicalRange()
| void setPhysicalRange |
( |
double |
min, |
|
|
double |
max = std::numeric_limits<double>::max() |
|
) |
| |
|
inline |
Sets absolute or typical range of this quantity.
For example, for probability the range would be [0.0, 1.0]. Setting range is useful when data are converted from some storage type to another
◆ setZero() [1/2]
| void setZero |
( |
const std::string & |
value | ) |
|
Set a value to be used like a real measurement, for example in interpolation.
- Parameters
-
| value | - substitute for undetect marker value. |
◆ setZero() [2/2]
| void setZero |
( |
double |
value | ) |
|
|
inline |
Set a value to be used like a real measurement, for example in interpolation.
- Parameters
-
| value | - substitute for undetect marker value, or signaling_NaN |
The documentation for this class was generated from the following files: