Timeseries-related functions. More...
Functions | |
void | helios::Context::addTimeseriesData (const char *label, float value, const Date &date, const Time &time) |
Add a data point to timeseries of data. | |
void | helios::Context::setCurrentTimeseriesPoint (const char *label, uint index) |
Set the Context date and time by providing the index of a timeseries data point. | |
float | helios::Context::queryTimeseriesData (const char *label, const Date &date, const Time &time) const |
Get a timeseries data point by specifying a date and time vector. | |
float | helios::Context::queryTimeseriesData (const char *label) const |
Get a timeseries data point at the time currently set in the Context. | |
float | helios::Context::queryTimeseriesData (const char *label, uint index) const |
Get a timeseries data point by index in the timeseries. | |
Time | helios::Context::queryTimeseriesTime (const char *label, uint index) const |
Get the time associated with a timeseries data point. | |
Date | helios::Context::queryTimeseriesDate (const char *label, uint index) const |
Get the date associated with a timeseries data point. | |
uint | helios::Context::getTimeseriesLength (const char *label) const |
Get the length of timeseries data. | |
bool | helios::Context::doesTimeseriesVariableExist (const char *label) const |
Query whether a timeseries variable exists. | |
Timeseries-related functions.
void Context::addTimeseriesData | ( | const char * | label, |
float | value, | ||
const Date & | date, | ||
const Time & | time | ||
) |
Add a data point to timeseries of data.
[in] | label | Name of timeseries variable (e.g., temperature) |
[in] | value | Value of timeseries data point |
[in] | date | Date vector corresponding to the time of ‘value’ (see Date) |
[in] | time | Time vector corresponding to the time of ‘value’ (see Time) |
Definition at line 574 of file Context.cpp.
bool Context::doesTimeseriesVariableExist | ( | const char * | label | ) | const |
Query whether a timeseries variable exists.
[in] | label | Name of timeseries variable (e.g., temperature) |
Definition at line 759 of file Context.cpp.
uint Context::getTimeseriesLength | ( | const char * | label | ) | const |
Get the length of timeseries data.
[in] | label | Name of timeseries variable (e.g., temperature) |
Definition at line 748 of file Context.cpp.
float Context::queryTimeseriesData | ( | const char * | label | ) | const |
Get a timeseries data point at the time currently set in the Context.
[in] | label | Name of timeseries variable (e.g., temperature) |
Definition at line 686 of file Context.cpp.
float Context::queryTimeseriesData | ( | const char * | label, |
const Date & | date, | ||
const Time & | time | ||
) | const |
Get a timeseries data point by specifying a date and time vector.
This method interpolates the timeseries data to provide a value at exactly ‘date’ and ‘time’. Thus, ‘date’ and ‘time’ must be between the first and last timeseries values.
[in] | label | Name of timeseries variable (e.g., temperature) |
[in] | date | Date vector corresponding to the time of ‘value’ (see Date) |
[in] | time | Time vector corresponding to the time of ‘value’ (see Time) |
Definition at line 638 of file Context.cpp.
float Context::queryTimeseriesData | ( | const char * | label, |
uint | index | ||
) | const |
Get a timeseries data point by index in the timeseries.
This method returns timeseries data by index, and is typically used when looping over all data in the timeseries. See getTimeseriesLength() to get the total length of the timeseries data.
[in] | label | Name of timeseries variable (e.g., temperature) |
[in] | index | Index of timeseries data point. The index starts at 0 for the earliest data point, and moves chronologically in time. |
Definition at line 690 of file Context.cpp.
Get the date associated with a timeseries data point.
[in] | label | Name of timeseries variable (e.g., temperature) |
[in] | index | Index of timeseries data point. The index starts at 0 for the earliest data point, and moves chronologically in time. |
Definition at line 732 of file Context.cpp.
Get the time associated with a timeseries data point.
[in] | label | Name of timeseries variable (e.g., temperature) |
[in] | index | Index of timeseries data point. The index starts at 0 for the earliest data point, and moves chronologically in time. |
Definition at line 698 of file Context.cpp.
void Context::setCurrentTimeseriesPoint | ( | const char * | label, |
uint | index | ||
) |
Set the Context date and time by providing the index of a timeseries data point.
[in] | label | Name of timeseries variable (e.g., temperature) |
[in] | index | Index of timeseries data point. The index starts at 0 for the earliest data point, and moves chronologically in time. |
Definition at line 630 of file Context.cpp.