Defines a function for table lookups. For example, used for linear interpolation, such as PVT.
More...
#include <DoubleTableLookup.h>
|
static constexpr char const * | XML_TAG = "DoubleTableLookup" |
|
Defines a function for table lookups. For example, used for linear interpolation, such as PVT.
Used for categorical properties, which also may use a double table lookup.
◆ DoubleTableLookup()
resqml2::DoubleTableLookup::DoubleTableLookup |
( |
gsoap_resqml2_0_1::eml20__DataObjectReference * | partialObject | ) |
|
|
inline |
Only to be used in partial transfer context.
- Parameters
-
[in] | partialObject | If non-nullptr, the partial object. |
◆ ~DoubleTableLookup()
virtual resqml2::DoubleTableLookup::~DoubleTableLookup |
( |
| ) |
|
|
virtualdefault |
Destructor does nothing since the memory is managed by the gSOAP context.
◆ addValue()
virtual void resqml2::DoubleTableLookup::addValue |
( |
double | key, |
|
|
double | value ) |
|
pure virtual |
Adds a key/value pair to this double table lookup. No verification that the key already exists is done.
- Parameters
-
key | A key. |
value | Teh associated value. |
◆ containsKey()
virtual bool resqml2::DoubleTableLookup::containsKey |
( |
double | key | ) |
|
|
pure virtual |
Checks whether a key is contained within this double table lookup.
- Parameters
-
- Returns
- True if
key
is a key of this double table lookup, false if not.
◆ getItemCount()
virtual unsigned int resqml2::DoubleTableLookup::getItemCount |
( |
| ) |
const |
|
pure virtual |
Gets the count of items in the double table lookup (in its map).
- Returns
- The count of items.
◆ getKeyAtIndex()
virtual double resqml2::DoubleTableLookup::getKeyAtIndex |
( |
unsigned int | index | ) |
const |
|
pure virtual |
Gets the key of a key/value pair at a particular index of this double table lookup (in its map).
- Exceptions
-
- Parameters
-
index | Zero-based index of the key/value pair. |
- Returns
- The key of the key/value pair at position
index
.
◆ getMap()
virtual std::map< double, double > resqml2::DoubleTableLookup::getMap |
( |
| ) |
const |
|
pure virtual |
Build and return a key/value map of this double table lookup. You cannot use this map to set a value since it is built at each call.
- Returns
- The key/value map.
◆ getMaximumValue()
virtual double resqml2::DoubleTableLookup::getMaximumValue |
( |
| ) |
|
|
pure virtual |
Gets the maximum key in this double table lookup. It reads it from file.
- Returns
- The maximum key if some key/value pairs exists in this double table lookup, otherwise the double lowest value.
◆ getMinimumValue()
virtual double resqml2::DoubleTableLookup::getMinimumValue |
( |
| ) |
|
|
pure virtual |
Gets the minimum key in this double table lookup. It reads it from file.
- Returns
- The minimum key if some key/value pairs exists in this double table lookup, otherwise the double maximum value.
◆ getValueAtIndex()
virtual double resqml2::DoubleTableLookup::getValueAtIndex |
( |
unsigned int | index | ) |
const |
|
pure virtual |
Gets the value of a key/value pair at a particular index of this double table lookup (in its map).
- Exceptions
-
- Parameters
-
index | Zero-based index of the key/value pair. |
- Returns
- The value of the key/value pair at position
index
.
◆ getValueAtKey()
virtual double resqml2::DoubleTableLookup::getValueAtKey |
( |
double | key | ) |
|
|
pure virtual |
Gets a value from its associated key.
- Parameters
-
- Returns
- The value corresponding to the key
longValue
if it exists, NaN if not.
◆ setValue()
virtual void resqml2::DoubleTableLookup::setValue |
( |
double | key, |
|
|
double | value ) |
|
pure virtual |
Modifies the value associated to a key. If the key does not exist, nothing is done.
- Parameters
-
key | A key. |
value | Teh associated value. |
◆ XML_TAG
constexpr char const* resqml2::DoubleTableLookup::XML_TAG = "DoubleTableLookup" |
|
staticconstexpr |
The standard XML tag without XML namespace for serializing this data object.
The documentation for this class was generated from the following file: