|
MeteoIODoc 20260919.909d27f1
Environmental timeseries pre-processing
|
Stores information about a data gap in a time series.
This class contains the anchor points and type information for gaps in meteo data. It provides methods for searching and managing gap boundaries.
#include <ResamplingAlgorithms.h>
Public Types | |
| enum | GapType { INTERPOLATION , EXTRAPOLATION_BEGIN , EXTRAPOLATION_END , NO_VALID_POINTS } |
| Gap type enumeration for temporal resampling. More... | |
Public Member Functions | |
| GapInfo () | |
| bool | isUndef () const |
| Test if the gap is properly defined. | |
| void | reset () |
| Reset all members of the gap so, making it undefined. | |
| void | setBefore (const size_t &idx, const std::vector< MeteoData > &vecM) |
| Setter for the 'before' anchor point of the gap. | |
| void | setAfter (const size_t &idx, const std::vector< MeteoData > &vecM) |
| Setter for the 'after' anchor point of the gap. | |
| std::string | toString () const |
| double | size () const |
| Return the size (in days) of the current gap or IOUtils::nodata if at least one boundary is unknown. | |
| size_t | searchBackward (const size_t &pos, const size_t ¶mindex, const std::vector< MeteoData > &vecM, const Date &resampling_date, const double &max_gap_size) |
| Search backward from pos to find the last valid point before a gap. | |
| size_t | searchForward (const size_t &pos, const size_t ¶mindex, const std::vector< MeteoData > &vecM, const Date &resampling_date, const double &max_gap_size) |
| Search forward from pos to find the first valid point after a gap. | |
Public Attributes | |
| Date | before |
| Date | after |
| Date of the first valid point after the gap. | |
| size_t | beforeIdx |
| Index of the last valid point before the gap. | |
| size_t | afterIdx |
| Index of the first valid point after the gap. | |
| GapType | gapType |
|
inline |
|
inline |
Test if the gap is properly defined.
|
inline |
Reset all members of the gap so, making it undefined.
| size_t mio::GapInfo::searchBackward | ( | const size_t & | pos, |
| const size_t & | paramindex, | ||
| const std::vector< MeteoData > & | vecM, | ||
| const Date & | resampling_date, | ||
| const double & | max_gap_size | ||
| ) |
Search backward from pos to find the last valid point before a gap.
| [in] | pos | Current position (index at requested date or next point after) |
| [in] | paramindex | Meteo parameter index |
| [in] | vecM | Timeseries of MeteoData for the given station |
| [in] | resampling_date | Date to resample |
| [in] | max_gap_size | Maximum gap size to search (in Julian days) |
| size_t mio::GapInfo::searchForward | ( | const size_t & | pos, |
| const size_t & | paramindex, | ||
| const std::vector< MeteoData > & | vecM, | ||
| const Date & | resampling_date, | ||
| const double & | max_gap_size | ||
| ) |
Search forward from pos to find the first valid point after a gap.
| [in] | pos | Current position (index at requested date or next point after) |
| [in] | paramindex | Meteo parameter index |
| [in] | vecM | Timeseries of MeteoData for the given station |
| [in] | resampling_date | Date to resample |
| [in] | max_gap_size | Maximum gap size to search (in Julian days) |
|
inline |
Setter for the 'after' anchor point of the gap.
| [in] | idx | Index in the timeseries of the first valid point after the gap |
| [in] | vecM | Timeseries of MeteoData |
|
inline |
Setter for the 'before' anchor point of the gap.
| [in] | idx | Index in the timeseries of the last valid point before the gap |
| [in] | vecM | Timeseries of MeteoData |
| double mio::GapInfo::size | ( | ) | const |
Return the size (in days) of the current gap or IOUtils::nodata if at least one boundary is unknown.
|
inline |
| size_t mio::GapInfo::afterIdx |
Index of the first valid point after the gap.
| Date mio::GapInfo::before |
| size_t mio::GapInfo::beforeIdx |
Index of the last valid point before the gap.
| GapType mio::GapInfo::gapType |